From feb352145af1643a57eaae99c0342e6f5e0f2a2e Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 4 Jul 2013 22:51:01 +0200 Subject: DefaultEDTUtil: If EDT is not started and task is null and wait intended, use nullTask ensuring to wait until EDT started. --- src/newt/classes/jogamp/newt/DefaultEDTUtil.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/newt/classes') 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) { -- cgit v1.2.3