diff options
Diffstat (limited to 'src/DatabaseQueue.cxx')
-rw-r--r-- | src/DatabaseQueue.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/DatabaseQueue.cxx b/src/DatabaseQueue.cxx index 26ac2c6fd..0e6e57848 100644 --- a/src/DatabaseQueue.cxx +++ b/src/DatabaseQueue.cxx @@ -49,11 +49,15 @@ bool findAddIn(struct player_control *pc, const char *uri, const struct locate_item_list *criteria, GError **error_r) { + const Database *db = GetDatabase(error_r); + if (db == nullptr) + return false; + const DatabaseSelection selection(uri, true, criteria); using namespace std::placeholders; const auto f = std::bind(AddToQueue, pc, _1, _2); - return GetDatabase()->Visit(selection, f, error_r); + return db->Visit(selection, f, error_r); } bool |