db/DatabaseSong: make the Storage optional
Some database plugins don't use a Storage (e.g. UPnP), and with this plugin, DatabaseDetachSong() can crash.
This commit is contained in:
@@ -41,7 +41,7 @@ SongLoader::LoadFromDatabase(const char *uri) const
|
||||
{
|
||||
#ifdef ENABLE_DATABASE
|
||||
if (db != nullptr)
|
||||
return DatabaseDetachSong(*db, *storage, uri);
|
||||
return DatabaseDetachSong(*db, storage, uri);
|
||||
#else
|
||||
(void)uri;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user