diff options
author | Sven Gothel <[email protected]> | 2012-10-12 23:28:52 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-10-12 23:28:52 +0200 |
commit | 51f055ae70f927638ac304436e9a1f02a1c0b570 (patch) | |
tree | c138dbaae7c9dd35e5c514f1e873a20d05f5a4be | |
parent | e03c5a17f1e6ebe7c8581469f35feb67a7100d15 (diff) |
GLCanvas: Avoid NPE in debug mode @ reshape (duh)
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index 31c91e046..1e9fcc95e 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -654,7 +654,9 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing super.reshape(x, y, width, height); if(DEBUG) { - System.err.println("GLCanvas.sizeChanged: ("+Thread.currentThread().getName()+"): "+width+"x"+height+" - surfaceHandle 0x"+Long.toHexString(getNativeSurface().getSurfaceHandle())); + final NativeSurface ns = getNativeSurface(); + final long nsH = null != ns ? ns.getSurfaceHandle() : 0; + System.err.println("GLCanvas.sizeChanged: ("+Thread.currentThread().getName()+"): "+width+"x"+height+" - surfaceHandle 0x"+Long.toHexString(nsH)); // Thread.dumpStack(); } if( validateGLDrawable() ) { |