summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/awt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-03-21 07:38:11 +0100
committerSven Gothel <[email protected]>2011-03-21 07:38:11 +0100
commit694eb0c9309b3705a8bdb582f0c287aa77169996 (patch)
tree1d7388c668b6cbc1ff21697454591f97dedb0612 /src/jogl/classes/javax/media/opengl/awt
parentab93183b90e83b9aebc29031c7b88b9a3dc58ff5 (diff)
Fix Bug #460 - GLCanvas NPE
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/awt')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLCanvas.java5
1 files changed, 4 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 086a17362..4e6c29e01 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -745,12 +745,15 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
@Override
public String toString() {
+ final int dw = (null!=drawable) ? drawable.getWidth() : -1;
+ final int dh = (null!=drawable) ? drawable.getHeight() : -1;
+
return "AWT-GLCanvas[Realized "+isRealized()+
",\n\t"+((null!=drawable)?drawable.getClass().getName():"null-drawable")+
",\n\tRealized "+isRealized()+
",\n\tFactory "+getFactory()+
",\n\thandle 0x"+Long.toHexString(getHandle())+
- ",\n\tDrawable size "+drawable.getWidth()+"x"+drawable.getHeight()+
+ ",\n\tDrawable size "+dw+"x"+dh+
",\n\tAWT pos "+getX()+"/"+getY()+", size "+getWidth()+"x"+getHeight()+
",\n\tvisible "+isVisible()+
",\n\t"+awtConfig+"]";