aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-08 21:00:16 +0200
committerMax Kellermann <max@duempel.org>2009-10-08 21:00:16 +0200
commit2ec89c6304a7f72a342a47a3d19f8f04d19735a1 (patch)
tree012202b0fb910abeee68fd598de63353c033e7ba /src
parent76953a9748e367442fe7c961845ee36b9a0e1596 (diff)
downloadmpd-2ec89c6304a7f72a342a47a3d19f8f04d19735a1.tar.gz
mpd-2ec89c6304a7f72a342a47a3d19f8f04d19735a1.tar.xz
mpd-2ec89c6304a7f72a342a47a3d19f8f04d19735a1.zip
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().
Diffstat (limited to '')
-rw-r--r--src/player_control.c3
1 files changed, 2 insertions, 1 deletions
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)