summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-11-09 21:51:54 +0100
committerSven Gothel <[email protected]>2011-11-09 21:51:54 +0100
commita968068d835a28610bd63e6eec5043cb4592cf08 (patch)
treee7aa178117a417127056935afab2487b36d1e1a9
parent8f5465396fe429ce6b7ecae808416691271c7867 (diff)
NewtCanvasAWT: Fix NPE (regression from commit 46542168d64b37f544f61802693f15b59b224e4e)
-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();