queue/PlaylistUpdate: assert Database::GetSong()!=nullptr
This commit is contained in:
parent
c1fa5279f4
commit
7a185f1ead
@ -37,14 +37,13 @@ UpdatePlaylistSong(const Database &db, DetachedSong &song)
|
|||||||
try {
|
try {
|
||||||
original = db.GetSong(song.GetURI());
|
original = db.GetSong(song.GetURI());
|
||||||
} catch (const std::runtime_error &e) {
|
} catch (const std::runtime_error &e) {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (original == nullptr)
|
|
||||||
/* not found - shouldn't happen, because the update
|
/* not found - shouldn't happen, because the update
|
||||||
thread should ensure that all stale Song instances
|
thread should ensure that all stale Song instances
|
||||||
have been purged */
|
have been purged */
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
assert(original != nullptr);
|
||||||
|
|
||||||
if (original->mtime == song.GetLastModified()) {
|
if (original->mtime == song.GetLastModified()) {
|
||||||
/* not modified */
|
/* not modified */
|
||||||
|
Loading…
Reference in New Issue
Block a user