avoid exception when cooja runs in testmode

This commit is contained in:
Fredrik Osterlind 2012-05-02 14:07:44 +02:00
parent d6dc216e02
commit 34e7de389c

View file

@ -116,6 +116,9 @@ public class LogScriptEngine {
/* Only called from the simulation loop */ /* Only called from the simulation loop */
private void stepScript() { private void stepScript() {
/* Release script - halt simulation */ /* Release script - halt simulation */
if (semaphoreScript == null || semaphoreSim == null) {
return;
}
semaphoreScript.release(); semaphoreScript.release();
/* ... script executing ... */ /* ... script executing ... */