[vlc-commits] macosx: fix another rare crash on exit

David Fuhrmann git at videolan.org
Wed Mar 21 17:56:51 CET 2012


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Wed Mar 21 15:33:17 2012 +0100| [bf916c3520997102ff862887065ec38f93efada2] | committer: David Fuhrmann

macosx: fix another rare crash on exit

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

 modules/gui/macosx/intf.m |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index f3766ce..ea59fe7 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -767,6 +767,7 @@ static VLCMain *_o_sharedMainInstance = nil;
     [o_coredialogs release];
     [o_eyetv release];
     [o_mainwindow release];
+    o_mainwindow = NULL;
 
     /* unsubscribe from libvlc's debug messages */
     vlc_Unsubscribe( p_intf->p_sys->p_sub );
@@ -1706,8 +1707,11 @@ unsigned int CocoaKeyToVLC( unichar i_key )
 - (void)setActiveVideoPlayback:(BOOL)b_value
 {
     b_active_videoplayback = b_value;
-    [o_mainwindow performSelectorOnMainThread:@selector(setVideoplayEnabled) withObject: nil waitUntilDone:NO];
-    [o_mainwindow performSelectorOnMainThread:@selector(togglePlaylist:) withObject: nil waitUntilDone:NO];
+    if( o_mainwindow )
+    {
+        [o_mainwindow performSelectorOnMainThread:@selector(setVideoplayEnabled) withObject:nil waitUntilDone:NO];
+        [o_mainwindow performSelectorOnMainThread:@selector(togglePlaylist:) withObject:nil waitUntilDone:NO];
+    }
 }
 
 - (BOOL)activeVideoPlayback



More information about the vlc-commits mailing list