From d83b46165483d12ed56329a9865c93428908ffb8 Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Mon, 4 Jun 2012 13:39:26 +0200 Subject: [PATCH] Added check if the interface is not available --- .../cooja/apps/mspsim/src/se/sics/cooja/mspmote/MspMote.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/MspMote.java b/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/MspMote.java index 315611eba..497132c87 100644 --- a/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/MspMote.java +++ b/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/MspMote.java @@ -416,6 +416,10 @@ public abstract class MspMote extends AbstractEmulatedMote implements Mote, Watc } MoteInterface moteInterface = getInterfaces().getInterfaceOfType(moteInterfaceClass); + if (moteInterface == null) { + logger.fatal("Could not find mote interface of class: " + moteInterfaceClass); + return false; + } moteInterface.setConfigXML(element.getChildren(), visAvailable); } }