From 78bb597a06180c968ff5a10a7e3f44bd058965d6 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 9 Oct 2015 06:08:06 +0200 Subject: Bug 1247: JAWTWindow fail early w/ useful info: setAWTGraphicsConfiguration(..) if awtConfig is null, getGraphicsConfiguration() if awtConfig is null --- .../classes/com/jogamp/nativewindow/awt/JAWTWindow.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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(); } -- cgit v1.2.3