diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/DatabaseGlue.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/DatabaseGlue.cxx b/src/DatabaseGlue.cxx index 013a3e329..fb41b40b7 100644 --- a/src/DatabaseGlue.cxx +++ b/src/DatabaseGlue.cxx @@ -112,13 +112,12 @@ db_get_root(void) Directory * db_get_directory(const char *name) { + assert(name != nullptr); + if (db == nullptr) return nullptr; Directory *music_root = db_get_root(); - if (name == nullptr) - return music_root; - return music_root->LookupDirectory(name); } |