From a5049136ffe020cd17109985e697fe2e8e1a18d5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 26 Dec 2014 13:43:27 +0100 Subject: DatabaseGlue: convert nullptr check to assertion --- src/DatabaseGlue.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3