From 62ddcb8345bbf1940b737b81c192d98a209a06ae Mon Sep 17 00:00:00 2001 From: nplourde Date: Sun, 10 Dec 2006 01:38:54 +0000 Subject: vo_macosx, fix crash when closing window git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21567 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_macosx.m | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'libvo') diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m index 03453c29eb..dd1520c43f 100644 --- a/libvo/vo_macosx.m +++ b/libvo/vo_macosx.m @@ -248,10 +248,13 @@ static void uninit(void) 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 @@ static int control(uint32_t request, void *data, ...) - (void)windowWillClose:(NSNotification *)aNotification { + mpGLView = NULL; mplayer_put_key(KEY_ESC); } @end -- cgit v1.2.3