summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-04-23 00:48:42 +0200
committerSven Gothel <[email protected]>2010-04-23 00:48:42 +0200
commit85d4923c52f8d91de37e24f67c1ce152af30eb2e (patch)
tree03126e7bc56a2b54f52b67ef5e2ba022565ad2fc /src/newt/classes/com/jogamp
parentc9b12606cf57c4ef255d88a65eb713ff9167c6de (diff)
Add missing finally unlock, if 2nd lock fails
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rwxr-xr-xsrc/newt/classes/com/jogamp/newt/macosx/MacWindow.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/newt/classes/com/jogamp/newt/macosx/MacWindow.java b/src/newt/classes/com/jogamp/newt/macosx/MacWindow.java
index 276843709..52d6fb0c7 100755
--- a/src/newt/classes/com/jogamp/newt/macosx/MacWindow.java
+++ b/src/newt/classes/com/jogamp/newt/macosx/MacWindow.java
@@ -216,7 +216,12 @@ public class MacWindow extends Window {
public synchronized int lockSurface() throws NativeWindowException {
nsViewLock.lock();
- return super.lockSurface();
+ try {
+ return super.lockSurface();
+ } catch (RuntimeException re) {
+ nsViewLock.unlock();
+ throw re;
+ }
}
public void unlockSurface() {