From 112e2a26004d974c3bba822fe1467a34784ec57d Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 26 Feb 2011 07:35:24 +0100 Subject: GLProfile: More Tolerant for missing features; MacOSX: Fix External Context / SWT; SWT Test: Distinguish awt/headless and main-thread (osx) swt launch --- src/jogl/classes/javax/media/opengl/GLProfile.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/jogl/classes/javax') diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java index b2f63cec4..17313f770 100644 --- a/src/jogl/classes/javax/media/opengl/GLProfile.java +++ b/src/jogl/classes/javax/media/opengl/GLProfile.java @@ -1393,12 +1393,16 @@ public class GLProfile { private static void dumpGLInfo(GLDrawableFactoryImpl factory, AbstractGraphicsDevice device) { GLContext ctx = factory.getOrCreateSharedContext(device); - System.err.println("GLProfile.dumpGLInfo: "+ctx); - ctx.makeCurrent(); - try { - System.err.println(JoglVersion.getGLInfo(ctx.getGL(), null)); - } finally { - ctx.release(); + if(null != ctx) { + System.err.println("GLProfile.dumpGLInfo: "+ctx); + ctx.makeCurrent(); + try { + System.err.println(JoglVersion.getGLInfo(ctx.getGL(), null)); + } finally { + ctx.release(); + } + } else { + System.err.println("GLProfile.dumpGLInfo: shared context n/a"); } } -- cgit v1.2.3