1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-03 22:14:02 +00:00

Merge branch 'bounds-check' into 'master'

Add bounds check

See merge request OpenMW/openmw!4067
This commit is contained in:
psi29a 2024-05-03 09:38:31 +00:00
commit ed116ebf04

View File

@ -602,7 +602,8 @@ void ContentSelectorModel::ContentModel::sortFiles()
emit layoutAboutToBeChanged();
int firstModifiable = 0;
while (mFiles.at(firstModifiable)->builtIn() || mFiles.at(firstModifiable)->fromAnotherConfigFile())
while (firstModifiable < mFiles.size()
&& (mFiles.at(firstModifiable)->builtIn() || mFiles.at(firstModifiable)->fromAnotherConfigFile()))
++firstModifiable;
// Dependency sort