diff options
author | Sven Gothel <[email protected]> | 2013-01-27 05:48:13 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-01-27 05:48:13 +0100 |
commit | 3f4eeaf76efa8f1f8b305c8dc1770dc679ced307 (patch) | |
tree | 951db4d4412c172d56f36f4e1a63970a0b58a4c7 /src/newt | |
parent | 336c8fc0b4f419196fe31f7dc86eed310160acaf (diff) |
Fix regression of commit b738983638703bb721ee4c9820c8ef43e2252e73, possible 'pulling' display's device - check references
Diffstat (limited to 'src/newt')
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index d033a8794..cb43fae32 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -879,7 +879,10 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer if( isNativeValid() ) { screen.removeScreenModeListener(screenModeListenerImpl); closeNativeImpl(); - config.getScreen().getDevice().close(); + final AbstractGraphicsDevice cfgADevice = config.getScreen().getDevice(); + if( cfgADevice != screen.getDisplay().getGraphicsDevice() ) { // don't pull display's device + cfgADevice.close(); // ensure a cfg's device is closed + } setGraphicsConfiguration(null); removeScreenReference(); } |