summaryrefslogtreecommitdiffstats
path: root/src/jogl/native/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/native/macosx')
-rw-r--r--src/jogl/native/macosx/MacOSXWindowSystemInterface.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
index 1eb3da96c..188d6d593 100644
--- a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
+++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
@@ -590,7 +590,7 @@ Bool deleteContext(void* nsJContext, Bool releaseOnMainThread) {
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
[nsContext clearDrawable];
- if(releaseOnMainThread) {
+ if(releaseOnMainThread && NO == [NSThread isMainThread]) {
[nsContext performSelectorOnMainThread:@selector(release:) withObject:nil waitUntilDone:YES];
} else {
// would hangs for ~10s for 1 of the shared context, set releaseOnMainThread=true !