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.
This commit is contained in:
Max Kellermann
2008-12-17 16:45:49 +01:00
parent 25c04a97d3
commit 13192546a8
3 changed files with 23 additions and 2 deletions
+7
View File
@@ -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;