aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/jogamp/newt/DefaultEDTUtil.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/newt/classes/jogamp/newt/DefaultEDTUtil.java b/src/newt/classes/jogamp/newt/DefaultEDTUtil.java
index c080e8380..f8ee31a06 100644
--- a/src/newt/classes/jogamp/newt/DefaultEDTUtil.java
+++ b/src/newt/classes/jogamp/newt/DefaultEDTUtil.java
@@ -174,6 +174,9 @@ public class DefaultEDTUtil implements EDTUtil {
if( !edt.isRunning() ) {
if( !stop ) {
startImpl();
+ if( wait && null == task ) {
+ task = nullTask; // ensures wait until started
+ }
} else {
// drop task and don't wait
task = null;
@@ -183,7 +186,7 @@ public class DefaultEDTUtil implements EDTUtil {
}
}
} else if(stop && null == task) {
- task = nullTask;
+ task = nullTask; // ensures execution triggering stop
}
if(null != task) {