Commit cab77e35 authored by Max Kellermann's avatar Max Kellermann

queue/PlaylistControl: fix crash after seek failure

This completes the bug fix commit 2065e329; if we clear "queued" then we must clear "queued_song" as well, or another variant of the assertion fails.
parent e3e90b4b
ver 0.20.15 (not yet released) ver 0.20.15 (not yet released)
* queue: fix crash after seek failure
* resampler * resampler
- soxr: clear internal state after manual song change - soxr: clear internal state after manual song change
* state file * state file
......
...@@ -212,8 +212,6 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time) ...@@ -212,8 +212,6 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time)
{ {
assert(queue.IsValidOrder(i)); assert(queue.IsValidOrder(i));
const DetachedSong *queued_song = GetQueuedSong();
pc.LockClearError(); pc.LockClearError();
stop_on_error = true; stop_on_error = true;
error_count = 0; error_count = 0;
...@@ -226,8 +224,6 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time) ...@@ -226,8 +224,6 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time)
playing = true; playing = true;
current = i; current = i;
queued_song = nullptr;
} }
queued = -1; queued = -1;
...@@ -235,7 +231,7 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time) ...@@ -235,7 +231,7 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time)
try { try {
pc.LockSeek(new DetachedSong(queue.GetOrder(i)), seek_time); pc.LockSeek(new DetachedSong(queue.GetOrder(i)), seek_time);
} catch (...) { } catch (...) {
UpdateQueuedSong(pc, queued_song); UpdateQueuedSong(pc, nullptr);
throw; throw;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment