From 36ca114629d8e9bef2faff3716ccdf8f7641fd10 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 29 Jan 2009 21:39:29 +0100 Subject: 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. --- src/player_control.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/player_control.c b/src/player_control.c index 94d3aa938..68b438cbc 100644 --- a/src/player_control.c +++ b/src/player_control.c @@ -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) -- cgit v1.2.3