mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-15 20:36:44 +00:00
Add bounds check
This commit is contained in:
parent
a57c350c08
commit
d148bd1cde
1 changed files with 2 additions and 1 deletions
|
@ -602,7 +602,8 @@ void ContentSelectorModel::ContentModel::sortFiles()
|
||||||
emit layoutAboutToBeChanged();
|
emit layoutAboutToBeChanged();
|
||||||
|
|
||||||
int firstModifiable = 0;
|
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;
|
++firstModifiable;
|
||||||
|
|
||||||
// Dependency sort
|
// Dependency sort
|
||||||
|
|
Loading…
Reference in a new issue