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:
parent
d06f8baf69
commit
f421c8a191
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user