Avoid crash during shutdown

This commit is contained in:
Klaus Basan
2019-03-29 21:15:08 +01:00
committed by Mat Sutcliffe
parent e5e6c53c82
commit 48da5da393
2 changed files with 4 additions and 4 deletions

View File

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