load simulation bug fix: loading a simulation and removing interfaces caused null-pointer exception
This commit is contained in:
parent
c8f379adf7
commit
44201a4f4e
|
@ -26,7 +26,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: ContikiMote.java,v 1.1 2006/08/21 12:13:10 fros4943 Exp $
|
||||
* $Id: ContikiMote.java,v 1.2 2006/08/23 12:18:27 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.contikimote;
|
||||
|
@ -300,7 +300,10 @@ public class ContikiMote implements Mote {
|
|||
}
|
||||
|
||||
MoteInterface moteInterface = myInterfaceHandler.getInterfaceOfType(moteInterfaceClass);
|
||||
moteInterface.setConfigXML(element.getChildren());
|
||||
if (moteInterface != null)
|
||||
moteInterface.setConfigXML(element.getChildren());
|
||||
else
|
||||
logger.warn("Can't restore configuration for non-existing interface: " + moteInterfaceClass.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue