Browse Source

Add NullCheck (#1182)

Andreas Mülder 8 years ago
parent
commit
066a7c8315

+ 2 - 1
plugins/org.yakindu.sct.simulation.core.sexec/src/org/yakindu/sct/simulation/core/sexec/interpreter/SuspendableTimingService.java

@@ -122,7 +122,8 @@ public class SuspendableTimingService implements ITimingService {
 
 	public synchronized void unscheduleTimeEvent(String eventName) {
 		ScheduledFuture<?> future = futures.remove(eventName);
-		future.cancel(false);
+		if(future != null)
+			future.cancel(false);
 		runnables.remove(eventName);
 	}