queue/PlaylistControl: clear "queued" before calling LockSeek()
This is necessary to avoid an assertion failure in UpdateQueuedSong() after LockSeek() has failed.
This commit is contained in:
parent
ac15581c56
commit
2065e32904
@ -212,12 +212,13 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time,
|
|||||||
queued_song = nullptr;
|
queued_song = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
queued = -1;
|
||||||
|
|
||||||
if (!pc.LockSeek(new DetachedSong(queue.GetOrder(i)), seek_time, error)) {
|
if (!pc.LockSeek(new DetachedSong(queue.GetOrder(i)), seek_time, error)) {
|
||||||
UpdateQueuedSong(pc, queued_song);
|
UpdateQueuedSong(pc, queued_song);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
queued = -1;
|
|
||||||
UpdateQueuedSong(pc, nullptr);
|
UpdateQueuedSong(pc, nullptr);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user