Commit a5049136 authored by Max Kellermann's avatar Max Kellermann

DatabaseGlue: convert nullptr check to assertion

parent 705b3c6b
...@@ -112,13 +112,12 @@ db_get_root(void) ...@@ -112,13 +112,12 @@ db_get_root(void)
Directory * Directory *
db_get_directory(const char *name) db_get_directory(const char *name)
{ {
assert(name != nullptr);
if (db == nullptr) if (db == nullptr)
return nullptr; return nullptr;
Directory *music_root = db_get_root(); Directory *music_root = db_get_root();
if (name == nullptr)
return music_root;
return music_root->LookupDirectory(name); return music_root->LookupDirectory(name);
} }
......
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