aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java
index a3230fa62..f3a548a08 100644
--- a/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java
@@ -89,6 +89,7 @@ public class DisplayDriver extends DisplayImpl {
}
}
+ @Override
protected void closeNativeImpl() {
DisplayRelease0(aDevice.getHandle(), javaObjectAtom, windowDeleteAtom);
javaObjectAtom = 0;
@@ -96,6 +97,7 @@ public class DisplayDriver extends DisplayImpl {
aDevice.close(); // closes X11 display
}
+ @Override
protected void dispatchMessagesNative() {
aDevice.lock();
try {
@@ -104,7 +106,9 @@ public class DisplayDriver extends DisplayImpl {
DispatchMessages0(handle, javaObjectAtom, windowDeleteAtom);
}
} finally {
- aDevice.unlock();
+ if(null != aDevice) { // could be pulled by destroy event
+ aDevice.unlock();
+ }
}
}