# HG changeset patch # User nplourde # Date 1165714734 0 # Node ID c35115c05c64c44a340499192b6793d7a14d8034 # Parent 9d9e0f1ef0e993a65bb9933f3c196e57538bc33a vo_macosx, fix crash when closing window diff -r 9d9e0f1ef0e9 -r c35115c05c64 libvo/vo_macosx.m --- a/libvo/vo_macosx.m Sun Dec 10 01:10:53 2006 +0000 +++ b/libvo/vo_macosx.m Sun Dec 10 01:38:54 2006 +0000 @@ -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