queue/PlaylistUpdate: catch and ignore DatabaseError

Fixes regression by commit 42f7df96
This commit is contained in:
Max Kellermann 2016-03-18 18:20:20 +01:00
parent 1543dd85b5
commit 06c172838c
1 changed files with 8 additions and 1 deletions

View File

@ -21,6 +21,7 @@
#include "Playlist.hxx"
#include "db/Interface.hxx"
#include "db/LightSong.hxx"
#include "db/DatabaseError.hxx"
#include "DetachedSong.hxx"
#include "util/Error.hxx"
@ -32,7 +33,13 @@ UpdatePlaylistSong(const Database &db, DetachedSong &song)
from the Database */
return false;
const LightSong *original = db.GetSong(song.GetURI(), IgnoreError());
const LightSong *original;
try {
original = db.GetSong(song.GetURI(), IgnoreError());
} catch (DatabaseError) {
return false;
}
if (original == nullptr)
/* not found - shouldn't happen, because the update
thread should ensure that all stale Song instances