diff options
author | Sven Gothel <[email protected]> | 2015-10-09 06:08:06 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-10-09 06:08:06 +0200 |
commit | 78bb597a06180c968ff5a10a7e3f44bd058965d6 (patch) | |
tree | 23303cc3273fd7a4f893ab134ab549f9af81f05d | |
parent | 0abf3c058b1ad7f43328a79098890149e6fa8a14 (diff) |
Bug 1247: JAWTWindow fail early w/ useful info: setAWTGraphicsConfiguration(..) if awtConfig is null, getGraphicsConfiguration() if awtConfig is null
-rw-r--r-- | src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java index 0d6e4e71c..1dce7428f 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java @@ -302,6 +302,9 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, System.err.println(jawtStr2("setAWTGraphicsConfiguration")+": "+this.awtConfig+" -> "+config); // Thread.dumpStack(); } + if( null == awtConfig ) { + throw new IllegalArgumentException(jawtStr2("")+": null config"); + } this.awtConfig = config; } /** @@ -775,6 +778,9 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, @Override public final AbstractGraphicsConfiguration getGraphicsConfiguration() { + if( null == awtConfig ) { + throw new NativeWindowException(jawtStr2("")+": null awtConfig, invalidated"); + } return awtConfig.getNativeGraphicsConfiguration(); } |