Commit 19ed2331 authored by Max Kellermann's avatar Max Kellermann

playlist: fix unprotected player_control access

parent faa4fff4
......@@ -239,9 +239,13 @@ playlist_sync(struct playlist *playlist, struct player_control *pc)
if (pc_next_song == NULL && playlist->queued != -1)
playlist_song_started(playlist, pc);
player_lock(pc);
pc_next_song = pc->next_song;
player_unlock(pc);
/* make sure the queued song is always set (if
possible) */
if (pc->next_song == NULL && playlist->queued < 0)
if (pc_next_song == NULL && playlist->queued < 0)
playlist_update_queued_song(playlist, pc, NULL);
}
}
......
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