diff --git a/src/AIModel/AIAircraft.cxx b/src/AIModel/AIAircraft.cxx index 87011bccd..d8765bee1 100644 --- a/src/AIModel/AIAircraft.cxx +++ b/src/AIModel/AIAircraft.cxx @@ -327,7 +327,12 @@ void FGAIAircraft::ProcessFlightPlan( double dt, time_t now ) { // Initialize the flightplan ////////////////////////////////////////////////////////////////////////// if (!prev||repositioned) { - handleFirstWaypoint(); + if (!fp->empty()) { + handleFirstWaypoint(); + } else { + SG_LOG(SG_AI, SG_WARN, getCallSign() << " didn't have a valid flightplan and was killed"); + setDie(true); + } return; } // end of initialization if (!fpExecutable(now)) {