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:
Max Kellermann
2017-02-08 09:47:43 +01:00
parent f689e28958
commit 777e15bd78
9 changed files with 15 additions and 15 deletions

View File

@@ -33,7 +33,7 @@ class DetachedSong;
*/
gcc_pure
DetachedSong
DatabaseDetachSong(const Storage &storage, const LightSong &song);
DatabaseDetachSong(const Storage *storage, const LightSong &song);
/**
* Look up a song in the database and convert it to a #DetachedSong
@@ -43,7 +43,7 @@ DatabaseDetachSong(const Storage &storage, const LightSong &song);
*/
gcc_pure
DetachedSong
DatabaseDetachSong(const Database &db, const Storage &storage,
DatabaseDetachSong(const Database &db, const Storage *storage,
const char *uri);
#endif