aboutsummaryrefslogtreecommitdiffstats
path: root/CNativeCode/OpenGL_X11.c
diff options
context:
space:
mode:
Diffstat (limited to 'CNativeCode/OpenGL_X11.c')
-rw-r--r--CNativeCode/OpenGL_X11.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/CNativeCode/OpenGL_X11.c b/CNativeCode/OpenGL_X11.c
index b764bd3..610611d 100644
--- a/CNativeCode/OpenGL_X11.c
+++ b/CNativeCode/OpenGL_X11.c
@@ -690,13 +690,13 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj,
fprintf(stderr, "GL4Java: gljDestroy failed, GL context is 0\n");
fflush(stderr);
}
- ret = JNI_FALSE;
}
glXMakeCurrent( disp, None, NULL );
if(ret==JNI_TRUE)
{
- glXDestroyContext(disp, gc);
+ if(gc!=0)
+ glXDestroyContext(disp, gc);
if(pix!=0)
{
if(win!=0)