diff options
author | Max Kellermann <max@duempel.org> | 2016-02-28 13:19:44 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2016-02-28 13:19:44 +0100 |
commit | 2065e3290452377b2931f3129b230c8cc536cbc8 (patch) | |
tree | dd73058d9199a698884fd392121c658525290b74 | |
parent | ac15581c56e5ee6e7a3a576b1eb5444a8259ef80 (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.cxx | 3 |
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; |