mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
Ref T786, further checks (shutdown, empty values)
This commit is contained in:
committed by
Mat Sutcliffe
parent
2156eb1831
commit
17cebfb8d3
@@ -174,7 +174,7 @@ namespace BlackCore
|
||||
void ISimulator::reloadWeatherSettings()
|
||||
{
|
||||
// log crash info about weather
|
||||
if (sApp && !sApp->isShuttingDown()) { CCrashHandler::instance()->crashAndLogAppendInfo(u"Simulator weather: " % boolToYesNo(m_isWeatherActivated)); }
|
||||
if (this->isShuttingDown()) { CCrashHandler::instance()->crashAndLogAppendInfo(u"Simulator weather: " % boolToYesNo(m_isWeatherActivated)); }
|
||||
if (!m_isWeatherActivated) { return; }
|
||||
m_lastWeatherPosition.setNull();
|
||||
const CWeatherScenario selectedWeatherScenario = m_weatherScenarioSettings.get();
|
||||
@@ -196,7 +196,7 @@ namespace BlackCore
|
||||
}
|
||||
|
||||
// log crash info about weather
|
||||
if (sApp && !sApp->isShuttingDown()) { CCrashHandler::instance()->crashAndLogAppendInfo(selectedWeatherScenario.toQString(true)); }
|
||||
if (this->isShuttingDown()) { CCrashHandler::instance()->crashAndLogAppendInfo(selectedWeatherScenario.toQString(true)); }
|
||||
}
|
||||
|
||||
void ISimulator::clearAllRemoteAircraftData()
|
||||
@@ -1384,7 +1384,7 @@ namespace BlackCore
|
||||
const QPointer<ISimulator> myself(this);
|
||||
QTimer::singleShot(t, this, [ = ]
|
||||
{
|
||||
if (myself.isNull() || myself->isShuttingDown()) { return; }
|
||||
if (!myself || myself->isShuttingDown()) { return; }
|
||||
this->displayLoggedSituationInSimulator(cs, stopLogging, times - 1);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user