aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_control.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-05-06 18:46:59 +0200
committerMax Kellermann <max@duempel.org>2009-05-06 18:46:59 +0200
commita4c59943d1b117adf51ef8839dadeea133c40f0d (patch)
treef5d65b8e0fc2d3e98632aaec53d2c2044883d31a /src/player_control.c
parent438f3547ccb6967ec16e7e1110ae424ff5afc234 (diff)
downloadmpd-a4c59943d1b117adf51ef8839dadeea133c40f0d.tar.gz
mpd-a4c59943d1b117adf51ef8839dadeea133c40f0d.tar.xz
mpd-a4c59943d1b117adf51ef8839dadeea133c40f0d.zip
player_control: assert that pc.next_song is NULL after seeking
The player thread must reset pc.next_song after seeking, even if that operation has failed. This patch adds an assertion.
Diffstat (limited to '')
-rw-r--r--src/player_control.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/player_control.c b/src/player_control.c
index a49fcecc9..ac4b006dd 100644
--- a/src/player_control.c
+++ b/src/player_control.c
@@ -232,6 +232,8 @@ pc_seek(struct song *song, float seek_time)
pc.seek_where = seek_time;
player_command(PLAYER_COMMAND_SEEK);
+ assert(pc.next_song == NULL);
+
idle_add(IDLE_PLAYER);
return true;