Add a check if the runway name exists in the airport runway table

This commit is contained in:
PlayeRom 2022-08-15 01:21:21 +02:00
parent 4a8e1e4981
commit 2e5dbbc0b8

View File

@ -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();