summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java
index 391b8b19d..5c2820dab 100644
--- a/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java
@@ -105,16 +105,15 @@ public class DisplayDriver extends DisplayImpl {
@Override
protected void dispatchMessagesNative() {
- aDevice.lock();
+ final AbstractGraphicsDevice _aDevice = aDevice; // aDevice could be pulled by destroy event
+ _aDevice.lock();
try {
- final long handle = aDevice.getHandle();
+ final long handle = _aDevice.getHandle();
if(0 != handle) {
DispatchMessages0(handle, javaObjectAtom, windowDeleteAtom /*, kbdHandle */); // XKB disabled for now
}
} finally {
- if(null != aDevice) { // could be pulled by destroy event
- aDevice.unlock();
- }
+ _aDevice.unlock();
}
}