mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
paranoid check in case of recurrence of race described in refs #270
This commit is contained in:
@@ -136,9 +136,13 @@ namespace BlackCore
|
||||
aircraft.setSituation(simulatorAircraft.getSituation());
|
||||
aircraft.setCockpit(simulatorAircraft.getCom1System(), simulatorAircraft.getCom2System(), simulatorAircraft.getTransponderCode());
|
||||
|
||||
// the method will check, if an update is really required
|
||||
// these are local (non DBus) calls
|
||||
this->getIContextOwnAircraft()->updateOwnAircraft(aircraft, this->getPathAndContextId());
|
||||
Q_ASSERT(this->getIContextOwnAircraft()); // paranoia against context having been deleted from another thread - redmine issue #270
|
||||
if (!this->getIContextOwnAircraft())
|
||||
{
|
||||
// the method will check, if an update is really required
|
||||
// these are local (non DBus) calls
|
||||
this->getIContextOwnAircraft()->updateOwnAircraft(aircraft, this->getPathAndContextId());
|
||||
}
|
||||
}
|
||||
|
||||
void CContextSimulator::addAircraftSituation(const CCallsign &callsign, const CAircraftSituation &initialSituation)
|
||||
|
||||
Reference in New Issue
Block a user