Commit 48fcb08c authored by Felix Paul Kühne's avatar Felix Paul Kühne

vout_macosx: add additional sanity checks to prevent rare crashes

parent 244a35b0
...@@ -423,6 +423,9 @@ static int Control (vout_display_t *vd, int query, va_list ap) ...@@ -423,6 +423,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