1
0
Fork 0

AITraffic: workaround missing node

Avoid 'findShortestRoute' exception by checking both the start
and end nodes are valid first. Doesn't fix the error but avoids
a traffic shutdown.

Sentry-Id: FLIGHTGEAR-2F
This commit is contained in:
Automatic Release Builder 2020-09-27 10:18:52 +01:00 committed by James Turner
parent 77b6d635fe
commit 18aabbdbb5

View file

@ -320,7 +320,7 @@ bool FGAIFlightPlan::createTakeoffTaxi(FGAIAircraft * ac, bool firstFlight,
}
FGTaxiRoute taxiRoute;
if ( runwayNode )
if ( runwayNode && node)
taxiRoute = gn->findShortestRoute(node, runwayNode);
// This may happen with buggy ground networks