diff --git a/src/Aircraft/controls.cxx b/src/Aircraft/controls.cxx index d22f81b6b..d2b197c18 100644 --- a/src/Aircraft/controls.cxx +++ b/src/Aircraft/controls.cxx @@ -1831,7 +1831,7 @@ void FGControls::fireEngineValueChanged(int index, simgear::PropertyList& props) std::for_each(props.begin(), props.end(), [](const SGPropertyNode_ptr &p) { p->fireValueChanged(); }); - } else { + } else if ((index >= 0) && (index < MAX_ENGINES)) { props.at(index)->fireValueChanged(); } }