From bc26f429928ec4d25782f7a0da09a68e38f758cd Mon Sep 17 00:00:00 2001 From: fros4943 Date: Thu, 26 Mar 2009 15:41:59 +0000 Subject: [PATCH] make sure components are initialized at tick event --- tools/cooja/java/se/sics/cooja/plugins/SimControl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/plugins/SimControl.java b/tools/cooja/java/se/sics/cooja/plugins/SimControl.java index 37250d30e..1c0a9a1c9 100644 --- a/tools/cooja/java/se/sics/cooja/plugins/SimControl.java +++ b/tools/cooja/java/se/sics/cooja/plugins/SimControl.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: SimControl.java,v 1.11 2009/03/09 15:39:33 fros4943 Exp $ + * $Id: SimControl.java,v 1.12 2009/03/26 15:41:59 fros4943 Exp $ */ package se.sics.cooja.plugins; @@ -122,8 +122,10 @@ public class SimControl extends VisPlugin { } } - sliderDelay.setValue(convertTimeToSlide(simulation.getDelayTime())); - simulationTime.setText("Current simulation time: " + simulation.getSimulationTime()); + if (sliderDelay != null) { + sliderDelay.setValue(convertTimeToSlide(simulation.getDelayTime())); + simulationTime.setText("Current simulation time: " + simulation.getSimulationTime()); + } } }); }