From b7a2e993b61a6f587bc4d6bb980f9c9de20cd962 Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 29 Sep 2017 12:49:10 +0100 Subject: [PATCH] Fix crash in traffic code Hit an exception where no runway node was found creating the landing taxi. Probably should not happen but anyway let's not crash --- src/AIModel/AIFlightPlanCreate.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AIModel/AIFlightPlanCreate.cxx b/src/AIModel/AIFlightPlanCreate.cxx index f36c11a7d..7a8fd7b45 100644 --- a/src/AIModel/AIFlightPlanCreate.cxx +++ b/src/AIModel/AIFlightPlanCreate.cxx @@ -409,7 +409,7 @@ bool FGAIFlightPlan::createLandingTaxi(FGAIAircraft * ac, FGAirport * apt, // fallback mechanism for this. // Starting from gate 0 doesn't work, so don't try it FGTaxiRoute taxiRoute; - if (gate.isValid()) + if (runwayNode && gate.isValid()) taxiRoute = gn->findShortestRoute(runwayNode, gate.parking()); if (taxiRoute.empty()) {