diff --git a/gl-natives/src/main/c/jaggl.c b/gl-natives/src/main/c/jaggl.c index 05134fc..83c068d 100644 --- a/gl-natives/src/main/c/jaggl.c +++ b/gl-natives/src/main/c/jaggl.c @@ -339,7 +339,9 @@ static void *jaggl_proc_addr(const char *name) { pixelFormat:(CGLPixelFormatObj)pixelFormat forLayerTime:(CFTimeInterval)layerTime displayTime:(const CVTimeStamp *)displayTime { - CGLSetCurrentContext(context); + if (CGLSetCurrentContext(context) != kCGLNoError) { + return; + } [lock lock];