Commit f30e3c94 authored by Gus Grubba's avatar Gus Grubba
Browse files

Fix crash on exit as "Fact" was calling a nullified qgcApp().

parent 168a7326
...@@ -733,11 +733,13 @@ FactValueSliderListModel* Fact::valueSliderModel(void) ...@@ -733,11 +733,13 @@ FactValueSliderListModel* Fact::valueSliderModel(void)
void Fact::_checkForRebootMessaging(void) void Fact::_checkForRebootMessaging(void)
{ {
if (!qgcApp()->runningUnitTests()) { if(qgcApp()) {
if (vehicleRebootRequired()) { if (!qgcApp()->runningUnitTests()) {
qgcApp()->showMessage(tr("Change of parameter %1 requires a Vehicle reboot to take effect.").arg(name())); if (vehicleRebootRequired()) {
} else if (qgcRebootRequired()) { qgcApp()->showMessage(tr("Change of parameter %1 requires a Vehicle reboot to take effect.").arg(name()));
qgcApp()->showMessage(tr("Change of '%1' value requires restart of %2 to take effect.").arg(shortDescription()).arg(qgcApp()->applicationName())); } else if (qgcRebootRequired()) {
qgcApp()->showMessage(tr("Change of '%1' value requires restart of %2 to take effect.").arg(shortDescription()).arg(qgcApp()->applicationName()));
}
} }
} }
} }
Supports Markdown
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