1
0
Fork 0

Guard against a possible crash in TowerController

This commit is contained in:
James Turner 2021-09-02 11:11:23 +01:00
parent 2cca2c0b4e
commit 90f14626f5

View file

@ -1027,10 +1027,13 @@ void FGTowerController::updateAircraftInformation(int id, double lat, double lon
} */
// only bother with aircraft that have a takeoff status of 2, since those are essentially under tower control
FGAIAircraft* ac= rwy->getFirstAircraftIndepartureQueue();
if (ac) {
if (ac->getTakeOffStatus() == 1) {
// transmit takeoff clearance
ac->setTakeOffStatus(2);
}
}
if (current.getAircraft()->getTakeOffStatus() == 2) {
current.setHoldPosition(false);
} else {