[vlc-commits] vout_macosx: add additional sanity checks to prevent rare crashes
Felix Paul Kühne
git at videolan.org
Mon Oct 1 23:27:24 CEST 2012
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Oct 1 23:26:48 2012 +0200| [48fcb08c1afd28d0aec079e964805254364d8dd8] | committer: Felix Paul Kühne
vout_macosx: add additional sanity checks to prevent rare crashes
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=48fcb08c1afd28d0aec079e964805254364d8dd8
---
modules/video_output/macosx.m | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index dc71dfa..8d31402 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -423,6 +423,9 @@ static int Control (vout_display_t *vd, int query, va_list ap)
static int OpenglLock (vlc_gl_t *gl)
{
vout_display_sys_t *sys = (vout_display_sys_t *)gl->sys;
+ if (!sys->glView || ![sys->glView respondsToSelector:@selector(openGLContext)])
+ return 1;
+
NSOpenGLContext *context = [sys->glView openGLContext];
CGLError err = CGLLockContext ([context CGLContextObj]);
if (kCGLNoError == err) {
More information about the vlc-commits
mailing list