]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/playlistinfo.m
macosx: fix wrong ref counting in media info
[vlc] / modules / gui / macosx / playlistinfo.m
index 9ec4cf5cebb49edae7eee60275f605fdf24de08f..8274ba51cadaeebe057c62ff5c8c7f6767ceb015 100644 (file)
@@ -499,10 +499,10 @@ error:
 
 - (void)refresh
 {
-    input_item_t * oldItem = p_item;
+    if (p_item)
+        vlc_gc_decref(p_item);
+
     p_item = [(VLCInfo *)[[VLCMain sharedInstance] info] item];
-    if (oldItem && oldItem != p_item)
-        vlc_gc_decref(oldItem);
 
     [o_children release];
     o_children = nil;