diff options
author | Sven Gothel <sgothel@jausoft.com> | 2013-04-17 15:04:05 +0200 |
---|---|---|
committer | Sven Gothel <sgothel@jausoft.com> | 2013-04-17 15:04:05 +0200 |
commit | 3cc6fd350fe56ac5b344ee75cfa8bfe4dcc44f1b (patch) | |
tree | a98646cfec25732a8896622cf8a0b32b2737c442 | |
parent | 61a47e07975eb2fd8b1f5f60552935c993a6eef6 (diff) |
GLJPanel.toString(): Avoid NPE
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java index dfb769eb4..e82ad54c3 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java @@ -764,7 +764,10 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing @Override public String toString() { - return "AWT-GLJPanel[ "+((null!=backend)?backend.getDrawable().getClass().getName():"null-drawable")+"]"; + final GLDrawable d = ( null != backend ) ? backend.getDrawable() : null; + return "AWT-GLJPanel[ drawableType "+ ( ( null != d ) ? d.getClass().getName() : "null" ) + + ", chosenCaps " + getChosenGLCapabilities() + + "]"; } private final Runnable disposeAction = new Runnable() { |