aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
index 4aaffb61f..1bcd8c39e 100644
--- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
+++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
@@ -345,8 +345,10 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
System.err.println("NewtCanvasAWT.destroy(): "+newtChild+", from "+cont);
}
configureNewtChild(false);
- nativeWindow.destroy();
- nativeWindow=null;
+ if(null!=nativeWindow) {
+ nativeWindow.destroy();
+ nativeWindow=null;
+ }
newtChild.setVisible(false);
newtChild.reparentWindow(null);
newtChild.destroy();