aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java')
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java b/src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java
index ae61c0063..e0446f4d6 100755
--- a/src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java
+++ b/src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java
@@ -51,6 +51,9 @@ public class X11ExternalGLContext extends X11GLContext {
lockToolkit();
try {
context = GLX.glXGetCurrentContext();
+ if (context == 0) {
+ throw new GLException("Error: attempted to make an external GLContext without a drawable/context current");
+ }
drawable = new Drawable(GLX.glXGetCurrentDisplay());
} finally {
unlockToolkit();