diff options
Diffstat (limited to 'src/DatabasePlaylist.cxx')
-rw-r--r-- | src/DatabasePlaylist.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/DatabasePlaylist.cxx b/src/DatabasePlaylist.cxx index c6ad9c543..69d87dfd7 100644 --- a/src/DatabasePlaylist.cxx +++ b/src/DatabasePlaylist.cxx @@ -43,11 +43,15 @@ search_add_to_playlist(const char *uri, const char *playlist_path_utf8, 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(AddSong, playlist_path_utf8, _1, _2); - return GetDatabase()->Visit(selection, f, error_r); + return db->Visit(selection, f, error_r); } bool |