1
0
Fork 0

Nasal/view.nas: pilot_view_limiter: protect against nil.

This commit is contained in:
Julian Smith 2019-07-22 15:02:18 +01:00
parent 294e76a47f
commit a10274665d

View file

@ -581,7 +581,7 @@ var pilot_view_limiter = {
offset = (me.right.threshold - hdg) * me.right.scale;
var new_offset = me.xoffset_lowpass.filter(offset);
me.xoffsetN.setDoubleValue(me.xoffsetN.getValue() - me.last_offset + new_offset);
me.xoffsetN.setDoubleValue((me.xoffsetN.getValue() or 0) - me.last_offset + new_offset);
me.last_offset = new_offset;
}
return 0;