Guard against aircraft with more than 4 engines

Fixes assert failure "index out of range" in QList<T>::at
This commit is contained in:
Mat Sutcliffe
2023-03-10 19:00:32 +00:00
parent dfc288bfd7
commit d1b1ee9c06

View File

@@ -702,7 +702,7 @@ namespace BlackSimPlugin::FsxCommon
for (int index = 0; index < simulatorOwnAircraft.numberOfEngines; ++index)
{
engines.push_back(CAircraftEngine(index + 1, helperList.at(index)));
engines.push_back(CAircraftEngine(index + 1, helperList.value(index, true)));
}
const CAircraftParts parts(lights,