[vlc-devel] commit: macosx: Don't release then retain the same item if we store it. ( Pierre d'Herbemont )

git version control git at videolan.org
Sat Sep 27 17:30:42 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sat Sep 27 17:33:12 2008 +0200| [321e0a5ad915ce5af1fb4e85227a61746dc0635f] | committer: Pierre d'Herbemont 

macosx: Don't release then retain the same item if we store it.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=321e0a5ad915ce5af1fb4e85227a61746dc0635f
---

 modules/gui/macosx/playlistinfo.m |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/gui/macosx/playlistinfo.m b/modules/gui/macosx/playlistinfo.m
index 9232351..7fe67c2 100644
--- a/modules/gui/macosx/playlistinfo.m
+++ b/modules/gui/macosx/playlistinfo.m
@@ -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;
 }




More information about the vlc-devel mailing list