Browse Source

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

QGC4.4
Gus Grubba 6 years ago
parent
commit
f30e3c9495
  1. 12
      src/FactSystem/Fact.cc

12
src/FactSystem/Fact.cc

@ -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()));
}
} }
} }
} }

Loading…
Cancel
Save