summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2013-07-04 22:51:01 +0200
committerSven Gothel <sgothel@jausoft.com>2013-07-04 22:51:01 +0200
commitfeb352145af1643a57eaae99c0342e6f5e0f2a2e (patch)
tree5d60ec7824ced858e940cd6f4bab925b0a246c54
parentd4c022b6b0fe7c3553c7ae218758d6e062905e10 (diff)
DefaultEDTUtil: If EDT is not started and task is null and wait intended, use nullTask ensuring to wait until EDT started.
-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) {