summaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-03-22 10:31:27 +0100
committerSven Gothel <[email protected]>2013-03-22 10:31:27 +0100
commit3673964caf2c4ac4efddffb8d7e9c28cce49b48c (patch)
tree3cc17a6a96c6e639ae7c025b0d25b665f5bce06c /src/newt
parent109def11bebd63f66eb0e751aa7932ce147a2738 (diff)
NEWT/Android WindowDriver.closeNative0(..): Catch Exception at surface destroy allowing to continue destruction.
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/jogamp/newt/driver/android/WindowDriver.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java
index 8002c49b3..8f9ee1c0f 100644
--- a/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java
@@ -376,11 +376,17 @@ public class WindowDriver extends jogamp.newt.WindowImpl implements Callback2 {
setupInputListener(false);
if(0 != eglSurface) {
- final EGLGraphicsDevice eglDevice = (EGLGraphicsDevice) getScreen().getDisplay().getGraphicsDevice();
- if (!EGL.eglDestroySurface(eglDevice.getHandle(), eglSurface)) {
- throw new GLException("Error destroying window surface (eglDestroySurface)");
+ try {
+ final EGLGraphicsDevice eglDevice = (EGLGraphicsDevice) getScreen().getDisplay().getGraphicsDevice();
+ if (!EGL.eglDestroySurface(eglDevice.getHandle(), eglSurface)) {
+ throw new GLException("Error destroying window surface (eglDestroySurface)");
+ }
+ } catch (Throwable t) {
+ Log.d(MD.TAG, "closeNativeImpl: Catch exception "+t.getMessage());
+ t.printStackTrace();
+ } finally {
+ eglSurface = 0;
}
- eglSurface = 0;
}
release0(surfaceHandle);