Commit 4d6eddac authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Folder: Don't try to fetch a folder from an empty mrl

This is likely to fix an undefined behavior, depending on the STL
version, the string capacity seems to be used, while being undefined
parent 55159798
......@@ -177,6 +177,8 @@ std::shared_ptr<Folder> Folder::blacklistedFolder( MediaLibraryPtr ml, const std
std::shared_ptr<Folder> Folder::fromMrl( MediaLibraryPtr ml, const std::string& mrl, BannedType bannedType )
if ( mrl.empty() == true )
return nullptr;
auto fsFactory = ml->fsFactoryForMrl( mrl );
if ( fsFactory == nullptr )
return nullptr;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment