diff options
author | Max Kellermann <max@duempel.org> | 2008-12-17 16:45:49 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-12-17 16:45:49 +0100 |
commit | 13192546a8386d91cac9045e86566906c220f3f6 (patch) | |
tree | 5d06c7b386d92f426f48dd5ec5f07aefd72e08d7 /src/player_control.c | |
parent | 25c04a97d3bab513134d78153a0fb0c3ac0fd553 (diff) | |
download | mpd-13192546a8386d91cac9045e86566906c220f3f6.tar.gz mpd-13192546a8386d91cac9045e86566906c220f3f6.tar.xz mpd-13192546a8386d91cac9045e86566906c220f3f6.zip |
playlist: clear pc.errored_song on delete
When a (remote) song is deleted from the playlist, there may still be
a reference to it in pc.errored_song. Clear this reference.
Diffstat (limited to 'src/player_control.c')
-rw-r--r-- | src/player_control.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/player_control.c b/src/player_control.c index 1d5c76aa0..bc55bcff4 100644 --- a/src/player_control.c +++ b/src/player_control.c @@ -44,6 +44,13 @@ void pc_deinit(void) notify_deinit(&pc.notify); } +void +pc_song_deleted(const struct song *song) +{ + if (pc.errored_song == song) + pc.errored_song = NULL; +} + static void player_command(enum player_command cmd) { pc.command = cmd; |