DatabaseGlue: convert nullptr check to assertion
This commit is contained in:
parent
705b3c6b63
commit
a5049136ff
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user