diff --git a/src/AutoPilotPlugins/APM/APMFlightModesComponent.cc b/src/AutoPilotPlugins/APM/APMFlightModesComponent.cc index d79626a3421d8249c752b2d3b33a20d4c906801e..7229a8ad9b8bcce2c975f054c4d7fa43c414c60f 100644 --- a/src/AutoPilotPlugins/APM/APMFlightModesComponent.cc +++ b/src/AutoPilotPlugins/APM/APMFlightModesComponent.cc @@ -66,8 +66,10 @@ QString APMFlightModesComponent::prerequisiteSetup(void) const if (!plugin->airframeComponent()->setupComplete()) { return plugin->airframeComponent()->name(); - } else if (!plugin->radioComponent()->setupComplete()) { - return plugin->radioComponent()->name(); + } else if (plugin->radioComponent() != NULL) { + if (!plugin->radioComponent()->setupComplete()) { + return plugin->radioComponent()->name(); + } } return QString();