Commit d05cf3d1 authored by Felix Paul Kühne's avatar Felix Paul Kühne

vout_macosx: add additional sanity checks to prevent rare crashes

(cherry picked from commit 48fcb08c1afd28d0aec079e964805254364d8dd8)
parent 0358f72c
...@@ -427,6 +427,9 @@ static int Control (vout_display_t *vd, int query, va_list ap) ...@@ -427,6 +427,9 @@ static int Control (vout_display_t *vd, int query, va_list ap)
static int OpenglLock (vlc_gl_t *gl) static int OpenglLock (vlc_gl_t *gl)
{ {
vout_display_sys_t *sys = (vout_display_sys_t *)gl->sys; 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]; NSOpenGLContext *context = [sys->glView openGLContext];
CGLError err = CGLLockContext ([context CGLContextObj]); CGLError err = CGLLockContext ([context CGLContextObj]);
if (kCGLNoError == err) if (kCGLNoError == err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment