PlaylistEdit: compare Song URIs in DeleteSong()

Fixes purging deleted songs from the queue after update.  Fixes
regression from commit e96779d.
This commit is contained in:
Max Kellermann 2013-10-22 00:13:39 +02:00
parent 2f43e4bc66
commit 2d696f46c3

View File

@ -323,8 +323,7 @@ void
playlist::DeleteSong(struct player_control &pc, const struct Song &song) playlist::DeleteSong(struct player_control &pc, const struct Song &song)
{ {
for (int i = queue.GetLength() - 1; i >= 0; --i) for (int i = queue.GetLength() - 1; i >= 0; --i)
// TODO: compare URI instead of pointer if (SongEquals(song, queue.Get(i)))
if (&song == &queue.Get(i))
DeletePosition(pc, i); DeletePosition(pc, i);
} }