Commit 36ca1146 authored by Max Kellermann's avatar Max Kellermann

player_control: reset pc.error if pc.errored_song is cleared

When the playlist is cleared, pc.errored_song is also cleared. This causes pc_errored_song_uri() to crash, because it assumes that pc.errored_song is set. Reset pc.error to fix that assumption.
parent d1b3377f
......@@ -49,8 +49,10 @@ void pc_deinit(void)
void
pc_song_deleted(const struct song *song)
{
if (pc.errored_song == song)
if (pc.errored_song == song) {
pc.error = PLAYER_ERROR_NOERROR;
pc.errored_song = NULL;
}
}
static void player_command(enum player_command cmd)
......
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