summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-26 13:43:27 +0100
committerMax Kellermann <max@duempel.org>2014-12-26 13:43:32 +0100
commita5049136ffe020cd17109985e697fe2e8e1a18d5 (patch)
tree06a058a804c6536f17004344a2be83d2c9a1f41d /src
parent705b3c6b63bd41f1eefe27c8d5291e3897026238 (diff)
DatabaseGlue: convert nullptr check to assertion
Diffstat (limited to 'src')
-rw-r--r--src/DatabaseGlue.cxx5
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);
}