diff options
author | Max Kellermann <max@musicpd.org> | 2018-01-05 13:00:24 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-01-05 13:00:24 +0100 |
commit | cab77e35e08af825bec745b8a3af93b9feff266b (patch) | |
tree | fce78cd182e0add589f86e4b68f5541f323760ef /src/queue | |
parent | e3e90b4b93a04d27712668838a590d0d43ec186a (diff) |
queue/PlaylistControl: fix crash after seek failure
This completes the bug fix commit
2065e3290452377b2931f3129b230c8cc536cbc8; if we clear "queued" then we
must clear "queued_song" as well, or another variant of the assertion
fails.
Diffstat (limited to 'src/queue')
-rw-r--r-- | src/queue/PlaylistControl.cxx | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/queue/PlaylistControl.cxx b/src/queue/PlaylistControl.cxx index 018ddcbb7..c71f29ba2 100644 --- a/src/queue/PlaylistControl.cxx +++ b/src/queue/PlaylistControl.cxx @@ -212,8 +212,6 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time) { assert(queue.IsValidOrder(i)); - const DetachedSong *queued_song = GetQueuedSong(); - pc.LockClearError(); stop_on_error = true; error_count = 0; @@ -226,8 +224,6 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time) playing = true; current = i; - - queued_song = nullptr; } queued = -1; @@ -235,7 +231,7 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time) try { pc.LockSeek(new DetachedSong(queue.GetOrder(i)), seek_time); } catch (...) { - UpdateQueuedSong(pc, queued_song); + UpdateQueuedSong(pc, nullptr); throw; } |