From 7a9f18684ddaa11d29c316bc5bbc376e06f1c1c9 Mon Sep 17 00:00:00 2001 From: jaegonlee Date: Tue, 22 Feb 2022 23:23:23 +0900 Subject: [PATCH] avoid crash on starting newt window --- src/jogl/native/macosx/MacOSXWindowSystemInterface.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m index 16b85974e..7d5514b4c 100644 --- a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m +++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m @@ -648,7 +648,7 @@ void updateContext(NSOpenGLContext* ctx) { NSView *nsView = [ctx view]; if(NULL != nsView) { DBG_PRINT("updateContext.0: ctx %p, ctx.view %p\n", ctx, nsView); - [ctx update]; + [ctx performSelectorOnMainThread:@selector(update) withObject:nil waitUntilDone:NO]; DBG_PRINT("updateContext.X\n"); } [pool release];