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:
		| @@ -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(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann