Prevent flightgear crash when clearing discontinuity in empty plan
This commit is contained in:
parent
bb622b661d
commit
28b7d17dfc
1 changed files with 3 additions and 0 deletions
|
@ -761,6 +761,9 @@ var flightPlanController = {
|
||||||
|
|
||||||
if (!me.temporaryFlag[plan]) {
|
if (!me.temporaryFlag[plan]) {
|
||||||
if (text == "CLR" and me.flightplans[2].getWP(index).wp_name == "DISCONTINUITY") {
|
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;
|
var thePlan = 2;
|
||||||
} else {
|
} else {
|
||||||
fmgc.flightPlanController.createTemporaryFlightPlan(plan);
|
fmgc.flightPlanController.createTemporaryFlightPlan(plan);
|
||||||
|
|
Loading…
Add table
Reference in a new issue