summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-02-28 13:19:44 +0100
committerMax Kellermann <max@duempel.org>2016-02-28 13:19:44 +0100
commit2065e3290452377b2931f3129b230c8cc536cbc8 (patch)
treedd73058d9199a698884fd392121c658525290b74
parentac15581c56e5ee6e7a3a576b1eb5444a8259ef80 (diff)
queue/PlaylistControl: clear "queued" before calling LockSeek()
This is necessary to avoid an assertion failure in UpdateQueuedSong() after LockSeek() has failed.
-rw-r--r--src/queue/PlaylistControl.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/queue/PlaylistControl.cxx b/src/queue/PlaylistControl.cxx
index 3c7a69c61..67ac9402f 100644
--- a/src/queue/PlaylistControl.cxx
+++ b/src/queue/PlaylistControl.cxx
@@ -212,12 +212,13 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time,
queued_song = nullptr;
}
+ queued = -1;
+
if (!pc.LockSeek(new DetachedSong(queue.GetOrder(i)), seek_time, error)) {
UpdateQueuedSong(pc, queued_song);
return false;
}
- queued = -1;
UpdateQueuedSong(pc, nullptr);
return true;