Commit 3e2df8f5 authored by Rustom Jehangir's avatar Rustom Jehangir

Prevent Flight Mode setup from crashing

parent efc19ab4
...@@ -66,8 +66,10 @@ QString APMFlightModesComponent::prerequisiteSetup(void) const ...@@ -66,8 +66,10 @@ QString APMFlightModesComponent::prerequisiteSetup(void) const
if (!plugin->airframeComponent()->setupComplete()) { if (!plugin->airframeComponent()->setupComplete()) {
return plugin->airframeComponent()->name(); return plugin->airframeComponent()->name();
} else if (!plugin->radioComponent()->setupComplete()) { } else if (plugin->radioComponent() != NULL) {
return plugin->radioComponent()->name(); if (!plugin->radioComponent()->setupComplete()) {
return plugin->radioComponent()->name();
}
} }
return QString(); return QString();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment