[MPlayer-cvslog] r21567 - trunk/libvo/vo_macosx.m

nplourde subversion at mplayerhq.hu
Sun Dec 10 02:38:54 CET 2006


Author: nplourde
Date: Sun Dec 10 02:38:54 2006
New Revision: 21567

Modified:
   trunk/libvo/vo_macosx.m

Log:
vo_macosx, fix crash when closing window

Modified: trunk/libvo/vo_macosx.m
==============================================================================
--- trunk/libvo/vo_macosx.m	(original)
+++ trunk/libvo/vo_macosx.m	Sun Dec 10 02:38:54 2006
@@ -248,10 +248,13 @@
 			mp_msg(MSGT_VO, MSGL_FATAL, "uninit: shmctl failed\n");
 	}
 
-	SetSystemUIMode( kUIModeNormal, 0);
-	CGDisplayShowCursor(kCGDirectMainDisplay);
-	
-	[autoreleasepool release];
+    SetSystemUIMode( kUIModeNormal, 0);
+    CGDisplayShowCursor(kCGDirectMainDisplay);
+    
+    if(mpGLView)
+    {
+        [autoreleasepool release];
+    }
 }
 
 static int preinit(const char *arg)
@@ -998,6 +1001,7 @@
 
 - (void)windowWillClose:(NSNotification *)aNotification
 {
+    mpGLView = NULL;
 	mplayer_put_key(KEY_ESC);
 }
 @end



More information about the MPlayer-cvslog mailing list