summaryrefslogtreecommitdiffstats
path: root/libvo/vo_macosx.m
diff options
context:
space:
mode:
authornplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-12-10 01:38:54 +0000
committernplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-12-10 01:38:54 +0000
commit62ddcb8345bbf1940b737b81c192d98a209a06ae (patch)
tree1c9f8ebbd0918ea4de5ccb5abba98899354b21a7 /libvo/vo_macosx.m
parent121bab971ce7d913565b3ccbd48a04ad9a145b46 (diff)
downloadmpv-62ddcb8345bbf1940b737b81c192d98a209a06ae.tar.bz2
mpv-62ddcb8345bbf1940b737b81c192d98a209a06ae.tar.xz
vo_macosx, fix crash when closing window
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21567 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_macosx.m')
-rw-r--r--libvo/vo_macosx.m12
1 files changed, 8 insertions, 4 deletions
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