Nasal/view.nas: pilot_view_limiter: protect against nil.
This commit is contained in:
parent
294e76a47f
commit
a10274665d
1 changed files with 1 additions and 1 deletions
|
@ -581,7 +581,7 @@ var pilot_view_limiter = {
|
||||||
offset = (me.right.threshold - hdg) * me.right.scale;
|
offset = (me.right.threshold - hdg) * me.right.scale;
|
||||||
|
|
||||||
var new_offset = me.xoffset_lowpass.filter(offset);
|
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;
|
me.last_offset = new_offset;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue