]> git.sesse.net Git - vlc/commitdiff
macosx: In bookmarks's dealloc, we shouldn't release the p_old_input ptr, as we have...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Wed, 20 Aug 2008 06:58:57 +0000 (08:58 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Wed, 20 Aug 2008 06:59:08 +0000 (08:59 +0200)
This should fix a crash reported in our bugreport ml.

modules/gui/macosx/bookmarks.m

index 5c562b058101a0b8ef7939c8ab7fb2a56afd9a00..f0fb02e7171b049dcc2fbd2257b75f935c187783 100644 (file)
@@ -76,8 +76,6 @@ static VLCBookmarks *_o_sharedInstance = nil;
 
 - (void)dealloc
 {
-    if( p_old_input )
-        vlc_object_release( p_old_input );
     [super dealloc];
 }
 
@@ -188,6 +186,9 @@ static VLCBookmarks *_o_sharedInstance = nil;
             pp_bookmarks[row]->i_byte_offset] stringValue]];
     }
  
+    /* Just keep the pointer value to check if it
+     * changes. Note, we don't need to keep a reference to the object.
+     * so release it now. */
     p_old_input = p_input;
     vlc_object_release( p_input );