diff --git a/gui/dialogs/location-in-air.xml b/gui/dialogs/location-in-air.xml index 66302894a..9d3fa0f1a 100644 --- a/gui/dialogs/location-in-air.xml +++ b/gui/dialogs/location-in-air.xml @@ -62,6 +62,9 @@ var carriers = props.globals.getNode( "/ai/models" ); combo.removeChildren("value"); + if (carriers == nil) + return; + foreach (var carrier; carriers.getChildren("carrier")) { nameNode = carrier.getNode("name"); if(nameNode != nil and nameNode.getValue() != nil) @@ -81,6 +84,9 @@ combo.addChild("value").setValue("FLOLS"); combo.addChild("value").setValue("Abeam"); + if (carriers == nil) + return; + foreach (var carrier; carriers.getChildren("carrier")) { if (carrier.getNode("name", 1).getValue() == getprop("/sim/presets/carrier")) { foreach (var parkpos; carrier.getChildren("parking-pos")) {