mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
Avoid crash during shutdown
This commit is contained in:
committed by
Mat Sutcliffe
parent
e5e6c53c82
commit
48da5da393
@@ -1137,13 +1137,12 @@ namespace BlackCore
|
||||
this->reverseLookupAndUpdateOwnAircraftModel(model);
|
||||
}
|
||||
|
||||
void ISimulator::reverseLookupAndUpdateOwnAircraftModel(const BlackMisc::Simulation::CAircraftModel &model)
|
||||
void ISimulator::reverseLookupAndUpdateOwnAircraftModel(const CAircraftModel &model)
|
||||
{
|
||||
Q_ASSERT_X(sApp, Q_FUNC_INFO, "Missing sApp");
|
||||
Q_ASSERT_X(sApp->hasWebDataServices(), Q_FUNC_INFO, "Missing web services");
|
||||
|
||||
if (!model.hasModelString()) { return; }
|
||||
if (this->isShuttingDown()) { return; }
|
||||
Q_ASSERT_X(sApp->hasWebDataServices(), Q_FUNC_INFO, "Missing web services");
|
||||
|
||||
if (this->getOwnAircraftModel() != model)
|
||||
{
|
||||
if (CDatabaseUtils::hasDbAircraftData())
|
||||
|
||||
@@ -150,6 +150,7 @@ namespace BlackGui
|
||||
|
||||
void CInfoBarStatusComponent::onSimulatorStatusChanged(int status)
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown()) { return; }
|
||||
const ISimulator::SimulatorStatus simStatus = static_cast<ISimulator::SimulatorStatus>(status);
|
||||
if (simStatus.testFlag(ISimulator::Connected))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user