]> git.sesse.net Git - vlc/commitdiff
Remove playlist items from the "items" array when they are deleted
authorRafaël Carré <funman@videolan.org>
Wed, 23 Apr 2008 08:25:46 +0000 (10:25 +0200)
committerRafaël Carré <funman@videolan.org>
Wed, 23 Apr 2008 08:39:46 +0000 (10:39 +0200)
Note that the only aim of this array seems to be counting the non-node items

src/playlist/item.c

index 0abf61b7b0d70a90d5e5a1c14e8fc4d861bd15d1..2452051de39fd7eb45b7a8e56ad176ec726ce14c 100644 (file)
@@ -852,6 +852,10 @@ static int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item,
     if( i != -1 )
         ARRAY_REMOVE( p_playlist->all_items, i );
 
+    ARRAY_BSEARCH( p_playlist->items,->i_id, int, i_id, i );
+    if( i != -1 )
+        ARRAY_REMOVE( p_playlist->items, i );
+
     /* Check if it is the current item */
     if( p_playlist->status.p_item == p_item )
     {