mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Guard against aircraft with more than 4 engines
Fixes assert failure "index out of range" in QList<T>::at
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user