Skip to content

Commit a11e683

Browse files
committed
Merge branch 'content-lists-could-provide-duplicate-fallback-archives' into 'master'
Gracefully handle content lists that specify duplicate BSAs Closes #8200 See merge request OpenMW/openmw!4421
2 parents e9627e9 + 0537b53 commit a11e683

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

apps/launcher/datafilespage.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,9 @@ void Launcher::DataFilesPage::populateFileViews(const QString& contentModelName)
399399
continue;
400400
const auto name = match[0]->text();
401401
const auto oldrow = ui.archiveListWidget->row(match[0]);
402+
// entries may be duplicated, e.g. if a content list predated a BSA being added to a non-user config file
403+
if (oldrow < row)
404+
continue;
402405
ui.archiveListWidget->takeItem(oldrow);
403406
ui.archiveListWidget->insertItem(row, name);
404407
ui.archiveListWidget->item(row)->setCheckState(Qt::Checked);

0 commit comments

Comments
 (0)