diff options
author | Kenneth Russel <[email protected]> | 2006-08-11 23:15:53 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-08-11 23:15:53 +0000 |
commit | bc01b42ca3cad33808ee2255628deadc49c04ef2 (patch) | |
tree | bd627681d61087b57ca842804145a04feaf27da0 /src/classes/com/sun/opengl/impl | |
parent | 6f472d3a74a34abb818708da6523caa484ecef9a (diff) |
Fixed crash triggered by Java 3D's JoglPipeline in off-screen
rendering on X11 platforms by watching for destruction of the pbuffer
out from under an application-created context; could do better by
explicitly destroying all application-created contexts in the shared
code for both the GLCanvas and GLPbufferImpl (and probably the
GLJPanel too)
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@881 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/impl')
-rw-r--r-- | src/classes/com/sun/opengl/impl/x11/X11PbufferGLContext.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/X11PbufferGLContext.java b/src/classes/com/sun/opengl/impl/x11/X11PbufferGLContext.java index 5ff3bd86c..4207c7d99 100644 --- a/src/classes/com/sun/opengl/impl/x11/X11PbufferGLContext.java +++ b/src/classes/com/sun/opengl/impl/x11/X11PbufferGLContext.java @@ -110,6 +110,10 @@ public class X11PbufferGLContext extends X11GLContext { protected void releaseImpl() throws GLException { lockToolkit(); try { + if (drawable.getDisplay() == 0) { + throw new GLException("Pbuffer destroyed out from under application-created context"); + } + if (!GLX.glXMakeContextCurrent(drawable.getDisplay(), 0, 0, 0)) { throw new GLException("Error freeing OpenGL context"); } |