diff src/audacious/playlist.c @ 2549:ef59b072a5d2 trunk

[svn] - update playlist->tail when an entry has been removed.
author yaz
date Sun, 18 Feb 2007 22:33:03 -0800
parents 68d1e9761cc5
children 7b1b52eb663b
line wrap: on
line diff
--- a/src/audacious/playlist.c	Sun Feb 18 20:42:53 2007 -0800
+++ b/src/audacious/playlist.c	Sun Feb 18 22:33:03 2007 -0800
@@ -392,6 +392,7 @@
     g_list_free(playlist->entries);
     playlist->position = NULL;
     playlist->entries = NULL;
+    playlist->tail = NULL;
 
     PLAYLIST_UNLOCK( playlist->mutex );
 
@@ -452,6 +453,7 @@
     playlist->shuffle = g_list_remove(playlist->shuffle, entry);
     playlist->queue = g_list_remove(playlist->queue, entry);
     playlist->entries = g_list_remove_link(playlist->entries, node);
+    playlist->tail = g_list_last(playlist->entries);
     playlist_entry_free(entry);
     g_list_free_1(node);