player_control: moved pc.next_song assertion into lock

The assertion shouldn't access player_control.next_song without
locking it.
This commit is contained in:
Max Kellermann 2009-11-03 23:17:44 +01:00
parent d06f8baf69
commit f421c8a191

View File

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