1
0
Fork 0

AI Prevent Segfault when aircraft gets bogus flightplan

This commit is contained in:
portree_kid 2022-11-23 14:37:30 +01:00
parent bd4e7462ac
commit ccf674e189

View file

@ -327,7 +327,12 @@ void FGAIAircraft::ProcessFlightPlan( double dt, time_t now ) {
// Initialize the flightplan
//////////////////////////////////////////////////////////////////////////
if (!prev||repositioned) {
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)) {