diff options
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r-- | src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java index 264bdf9d3..5a0c8a79a 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java @@ -101,14 +101,15 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { OSXUtil.RunOnMainThread(false, true /* kickNSApp */, new Runnable() { @Override public void run() { + if( 0 != jawtSurfaceLayersHandle) { + // null rootSurfaceLayer OK + UnsetJAWTRootSurfaceLayer0(jawtSurfaceLayersHandle, rootSurfaceLayer); + } + jawtSurfaceLayersHandle = 0; if( 0 != rootSurfaceLayer ) { - if( 0 != jawtSurfaceLayersHandle) { - UnsetJAWTRootSurfaceLayer0(jawtSurfaceLayersHandle, rootSurfaceLayer); - } OSXUtil.DestroyCALayer(rootSurfaceLayer); rootSurfaceLayer = 0; } - jawtSurfaceLayersHandle = 0; } }); } |