diff options
author | Max Kellermann <max@duempel.org> | 2009-01-29 21:39:29 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-29 21:39:29 +0100 |
commit | 36ca114629d8e9bef2faff3716ccdf8f7641fd10 (patch) | |
tree | 688ec8b290493a04c0bbb80e3054d64ca954956b /src | |
parent | d1b3377f4a7d3a8c6a6e22581c7d5e67ed9bb353 (diff) | |
download | mpd-36ca114629d8e9bef2faff3716ccdf8f7641fd10.tar.gz mpd-36ca114629d8e9bef2faff3716ccdf8f7641fd10.tar.xz mpd-36ca114629d8e9bef2faff3716ccdf8f7641fd10.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/player_control.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) |