Commit f421c8a1 authored by Max Kellermann's avatar Max Kellermann

player_control: moved pc.next_song assertion into lock

The assertion shouldn't access player_control.next_song without locking it.
parent d06f8baf
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment