From 3cc6fd350fe56ac5b344ee75cfa8bfe4dcc44f1b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 17 Apr 2013 15:04:05 +0200 Subject: GLJPanel.toString(): Avoid NPE --- src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/jogl') 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() { -- cgit v1.2.3