diff options
author | Sven Gothel <[email protected]> | 2013-07-04 22:51:01 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-07-04 22:51:01 +0200 |
commit | feb352145af1643a57eaae99c0342e6f5e0f2a2e (patch) | |
tree | 5d60ec7824ced858e940cd6f4bab925b0a246c54 /src | |
parent | d4c022b6b0fe7c3553c7ae218758d6e062905e10 (diff) |
DefaultEDTUtil: If EDT is not started and task is null and wait intended, use nullTask ensuring to wait until EDT started.
Diffstat (limited to 'src')
-rw-r--r-- | src/newt/classes/jogamp/newt/DefaultEDTUtil.java | 5 |
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) { |