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

pull/3236/head
Dave Corley 6 months ago
parent 7888a11c36
commit b43743212e

@ -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)

Loading…
Cancel
Save