1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00

FIX: check we're not going out of range while listing content files, fix #8029

This commit is contained in:
Dave Corley 2024-06-22 23:47:47 -05:00
parent 7888a11c36
commit b43743212e

View File

@ -673,7 +673,8 @@ void ContentSelectorModel::ContentModel::setNonUserContent(const QStringList& fi
file->setFromAnotherConfigFile(mNonUserContent.contains(file->fileName().toLower()));
int insertPosition = 0;
while (mFiles.at(insertPosition)->builtIn())
while (insertPosition < mFiles.size() && mFiles.at(insertPosition)->builtIn())
++insertPosition;
for (const auto& filepath : fileList)