aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-03 23:17:44 +0100
committerMax Kellermann <max@duempel.org>2009-11-03 23:17:44 +0100
commitf421c8a191fed308af63fa4dd1d1412e3d8fbb57 (patch)
treeb93a21cc3c98a014135f39552469b3f3c61db4f6
parentd06f8baf690127dabb52ce0727e01d66b22a83de (diff)
downloadmpd-f421c8a191fed308af63fa4dd1d1412e3d8fbb57.tar.gz
mpd-f421c8a191fed308af63fa4dd1d1412e3d8fbb57.tar.xz
mpd-f421c8a191fed308af63fa4dd1d1412e3d8fbb57.zip
player_control: moved pc.next_song assertion into lock
The assertion shouldn't access player_control.next_song without locking it.
Diffstat (limited to '')
-rw-r--r--src/player_control.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/player_control.c b/src/player_control.c
index 1828a1ca0..220d39a22 100644
--- a/src/player_control.c
+++ b/src/player_control.c
@@ -255,9 +255,10 @@ void
pc_enqueue_song(struct song *song)
{
assert(song != NULL);
- assert(pc.next_song == NULL);
player_lock();
+ assert(pc.next_song == NULL);
+
pc.next_song = song;
player_command_locked(PLAYER_COMMAND_QUEUE);
player_unlock();