Stopped to load plugins depending on simulations if there is no simulation

This commit is contained in:
Sebastian Schinabeck 2014-01-21 14:56:32 +01:00
parent 792d60f03e
commit 86320d74ed

View file

@ -963,7 +963,7 @@ public class Cooja extends Observable {
tooltip += description + " (" + newPluginClass.getName() + ")";
/* Check if simulation plugin depends on any particular radio medium */
if (pluginType == PluginType.SIM_PLUGIN || pluginType == PluginType.SIM_STANDARD_PLUGIN) {
if ((pluginType == PluginType.SIM_PLUGIN || pluginType == PluginType.SIM_STANDARD_PLUGIN) && (getSimulation() != null)) {
if (newPluginClass.getAnnotation(SupportedArguments.class) != null) {
boolean active = false;
Class<? extends RadioMedium>[] radioMediums = newPluginClass.getAnnotation(SupportedArguments.class).radioMediums();