1
0
Fork 0

Prevent flightgear crash when clearing discontinuity in empty plan

This commit is contained in:
Jonathan Redpath 2022-01-18 12:25:01 +00:00
parent bb622b661d
commit 28b7d17dfc

View file

@ -761,6 +761,9 @@ var flightPlanController = {
if (!me.temporaryFlag[plan]) {
if (text == "CLR" and me.flightplans[2].getWP(index).wp_name == "DISCONTINUITY") {
if (me.flightplans[2].getPlanSize() == 3 and me.flightplans[2].departure_runway == nil and me.flightplans[2].destination_runway == nil and index == 1) {
return 1;
}
var thePlan = 2;
} else {
fmgc.flightPlanController.createTemporaryFlightPlan(plan);