Add a check if the runway name exists in the airport runway table
This commit is contained in:
parent
4a8e1e4981
commit
2e5dbbc0b8
@ -177,6 +177,12 @@ var generateFlightPlanXml = func () {
|
||||
}
|
||||
|
||||
var airport = airportinfo(icao);
|
||||
|
||||
if (!contains(airport.runways, runwayName)) {
|
||||
messages.displayError("The " ~ icao ~" airport does not have runway " ~ runwayName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
var runway = airport.runways[runwayName];
|
||||
|
||||
var minRwyLength = getMinRunwayLength();
|
||||
|
Loading…
Reference in New Issue
Block a user