]> git.sesse.net Git - vlc/commitdiff
macosx: Don't release then retain the same item if we store it.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 27 Sep 2008 15:33:12 +0000 (17:33 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 27 Sep 2008 15:33:12 +0000 (17:33 +0200)
modules/gui/macosx/playlistinfo.m

index 9232351a94e34a962774b10ad14341c78cbaa8f5..7fe67c2be6a5865d5cd6ed5f0b044b84aa5d4790 100644 (file)
@@ -573,8 +573,10 @@ error:
 
 - (void)refresh
 {
-    if( p_item ) vlc_gc_decref( p_item );
+    input_item_t * oldItem = p_item;
     p_item = [[[VLCMain sharedInstance] getInfo] item];
+    if( oldItem && oldItem != p_item ) vlc_gc_decref( oldItem );
+
     [o_children release];
     o_children = nil;
 }