summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
index bee2b28f9..53043c3cc 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
@@ -151,7 +151,10 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
if(DEBUG) {
System.err.println("EGLDrawableFactory.destroy("+shutdownType+"): "+sr.device.toString());
}
- EGLDisplayUtil.eglTerminate(sr.device.getHandle());
+ final long eglDisplay = sr.device.getHandle();
+ if(EGL.EGL_NO_DISPLAY != eglDisplay) {
+ EGLDisplayUtil.eglTerminate(eglDisplay);
+ }
}
sharedMap.clear();
sharedMap = null;