1
0
Fork 0

Avoid a segfault-on-null

This code is called both when there's no ground-net, but also when there's no parking data at all.
This commit is contained in:
James Turner 2012-09-23 23:07:00 +01:00
parent b1854459b3
commit 66a6438de1

View file

@ -355,9 +355,11 @@ void FGAIFlightPlan::createDefaultLandingTaxi(FGAIAircraft * ac,
pushBackWaypoint(wpt);
FGParking* parkPos = aAirport->getDynamics()->getParking(gateId);
wpt = createOnGround(ac, "ENDtaxi", parkPos->getGeod(), airportElev,
if (parkPos) {
wpt = createOnGround(ac, "ENDtaxi", parkPos->getGeod(), airportElev,
ac->getPerformance()->vTaxi());
pushBackWaypoint(wpt);
pushBackWaypoint(wpt);
}
}
bool FGAIFlightPlan::createLandingTaxi(FGAIAircraft * ac, FGAirport * apt,