aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/Animator.java11
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java11
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDrawableHelper.java2
3 files changed, 16 insertions, 8 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/Animator.java b/src/jogl/classes/com/jogamp/opengl/util/Animator.java
index 4d61adaa6..c7a03eddb 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/Animator.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/Animator.java
@@ -237,11 +237,14 @@ public class Animator extends AnimatorBase {
stopIssued = false;
pauseIssued = false;
isAnimating = false;
- if( null != displayCaught ) {
- handleUncaughtException(displayCaught);
+ try {
+ if( null != displayCaught ) {
+ handleUncaughtException(displayCaught); // may throw exception if null handler
+ }
+ } finally {
+ animThread = null;
+ Animator.this.notifyAll();
}
- animThread = null;
- Animator.this.notifyAll();
}
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
index ec6c8aae7..dc4a9a896 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
@@ -232,11 +232,14 @@ public class FPSAnimator extends AnimatorBase {
}
}
isAnimating = false;
- if( null != displayCaught ) {
- handleUncaughtException(displayCaught);
+ try {
+ if( null != displayCaught ) {
+ handleUncaughtException(displayCaught); // may throw exception if null handler
+ }
+ } finally {
+ animThread = null;
+ FPSAnimator.this.notifyAll();
}
- animThread = null;
- FPSAnimator.this.notifyAll();
}
}
}
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
index edf20cc62..ec0d85c91 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
@@ -898,6 +898,7 @@ public class GLDrawableHelper {
if( isGLThread ) {
// Run immediately, don't defer since locked by this thread, but isGLThread
deferredHere = false;
+ wait = false;
} else {
// Locked by this thread, but _not_ isGLThread -> ERROR
throw new IllegalStateException("Deferred, wait, isLocked on current and not GL-Thread: thread "+Thread.currentThread());
@@ -963,6 +964,7 @@ public class GLDrawableHelper {
if( isGLThread ) {
// Run immediately, don't defer since locked by this thread, but isGLThread
deferredHere = false;
+ wait = false;
} else {
// Locked by this thread, but _not_ isGLThread -> ERROR
throw new IllegalStateException("Deferred, wait, isLocked on current and not GL-Thread: thread "+Thread.currentThread());