aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/GLProfile.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-08-21 08:39:53 +0200
committerSven Gothel <[email protected]>2019-08-21 08:39:53 +0200
commit33531f146a5f92af65b458b422e673692806cecd (patch)
treef341217f139379994e208b0971a9660657e14fc1 /src/jogl/classes/com/jogamp/opengl/GLProfile.java
parent209bb2f0dc3418d168dc6887802bf4368b6d6f4e (diff)
JoglVersion.getGLInfo: Increase robustness of debug output
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/GLProfile.java')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/GLProfile.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/GLProfile.java b/src/jogl/classes/com/jogamp/opengl/GLProfile.java
index 0e0d45444..9b96adf71 100644
--- a/src/jogl/classes/com/jogamp/opengl/GLProfile.java
+++ b/src/jogl/classes/com/jogamp/opengl/GLProfile.java
@@ -2031,11 +2031,14 @@ public class GLProfile {
final GLContext ctx = factory.getOrCreateSharedContext(device);
if(null != ctx) {
System.err.println("GLProfile.dumpGLInfo: "+ctx);
- ctx.makeCurrent();
- try {
- System.err.println(JoglVersion.getGLInfo(ctx.getGL(), null));
- } finally {
- ctx.release();
+ if( GLContext.CONTEXT_NOT_CURRENT != ctx.makeCurrent() ) {
+ try {
+ System.err.println(JoglVersion.getGLInfo(ctx.getGL(), null));
+ } finally {
+ ctx.release();
+ }
+ } else {
+ System.err.println("GLProfile.dumpGLInfo: Couldn't make context current");
}
} else {
System.err.println("GLProfile.dumpGLInfo: shared context n/a");