From 2ec89c6304a7f72a342a47a3d19f8f04d19735a1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 8 Oct 2009 21:00:16 +0200 Subject: player_control: clear errored_song in clearPlayerError() Without the player error code, it errored_song variable is not used, and should be cleared, to avoid invalid access in pc_song_deleted(). --- src/player_control.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/player_control.c b/src/player_control.c index e27052a4d..26b7e517a 100644 --- a/src/player_control.c +++ b/src/player_control.c @@ -149,7 +149,8 @@ enum player_state getPlayerState(void) void clearPlayerError(void) { - pc.error = 0; + pc.error = PLAYER_ERROR_NOERROR; + pc.errored_song = NULL; } enum player_error getPlayerError(void) -- cgit v1.2.3