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.
This commit is contained in:
Max Kellermann 2009-01-29 21:39:29 +01:00
parent d1b3377f4a
commit 36ca114629

View File

@ -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)