From 2e5dbbc0b88b76bb4e511dd877e31845f2bde25f Mon Sep 17 00:00:00 2001 From: PlayeRom Date: Mon, 15 Aug 2022 01:21:21 +0200 Subject: [PATCH] Add a check if the runway name exists in the airport runway table --- aerotow.nas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aerotow.nas b/aerotow.nas index c084846..aa67a71 100644 --- a/aerotow.nas +++ b/aerotow.nas @@ -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();