summaryrefslogtreecommitdiff
path: root/src/queue
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-02-08 09:53:14 +0100
committerMax Kellermann <max@musicpd.org>2017-02-08 09:53:14 +0100
commit7a185f1ead87d68ff0a2a002d8d5838e833f8ef9 (patch)
tree7549d49ef0e0120fd8fb77a7db2fd334e13fc766 /src/queue
parentc1fa5279f4d1d1e20b9c71459684ab7800a3c5ca (diff)
queue/PlaylistUpdate: assert Database::GetSong()!=nullptr
Diffstat (limited to 'src/queue')
-rw-r--r--src/queue/PlaylistUpdate.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/queue/PlaylistUpdate.cxx b/src/queue/PlaylistUpdate.cxx
index 2ca4e0634..fe6942ecd 100644
--- a/src/queue/PlaylistUpdate.cxx
+++ b/src/queue/PlaylistUpdate.cxx
@@ -37,14 +37,13 @@ UpdatePlaylistSong(const Database &db, DetachedSong &song)
try {
original = db.GetSong(song.GetURI());
} catch (const std::runtime_error &e) {
- return false;
- }
-
- if (original == nullptr)
/* not found - shouldn't happen, because the update
thread should ensure that all stale Song instances
have been purged */
return false;
+ }
+
+ assert(original != nullptr);
if (original->mtime == song.GetLastModified()) {
/* not modified */