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:
Max Kellermann 2016-02-28 13:19:44 +01:00
parent ac15581c56
commit 2065e32904

View File

@ -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;