From b9aa38f304d0a4726e3a0c64d8ce7adda315baf2 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 26 Mar 2011 01:02:39 +0100 Subject: Fix unnecessary NPE in case of unrealized GLCanvas (getRequestedCapabilities()) --- src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index 4e6c29e01..4076dac54 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -710,7 +710,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing public GLCapabilitiesImmutable getRequestedGLCapabilities() { if (awtConfig == null) { - throw new GLException("No AWTGraphicsConfiguration: "+this); + return capsReqUser; } return (GLCapabilitiesImmutable)awtConfig.getRequestedCapabilities(); -- cgit v1.2.3