1
0
Fork 0

agl: need to check for nil

This commit is contained in:
mfranz 2007-10-07 17:09:13 +00:00
parent dfd21c722d
commit 095e3e717e

View file

@ -250,7 +250,7 @@ _setlistener("/sim/signals/nasal-dir-initialized", func {
return;
if (getprop("/sim/presets/airport-id") == "KSFO" and rwy == "28R")
return;
if (getprop("/position/altitude-agl-ft") > 100)
if ((var agl = getprop("/position/altitude-agl-ft")) != nil and agl > 100)
return;
atc.setValue("You are on runway " ~ rwy);
}, 1);