From 2065e3290452377b2931f3129b230c8cc536cbc8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 28 Feb 2016 13:19:44 +0100 Subject: [PATCH] queue/PlaylistControl: clear "queued" before calling LockSeek() This is necessary to avoid an assertion failure in UpdateQueuedSong() after LockSeek() has failed. --- src/queue/PlaylistControl.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;