diff options
| author | Qudix <17361645+Qudix@users.noreply.github.com> | 2020-11-11 23:30:03 -0600 |
|---|---|---|
| committer | Qudix <17361645+Qudix@users.noreply.github.com> | 2020-11-11 23:30:03 -0600 |
| commit | 125fc7a82e5ddf51b91f834661f7de9356831714 (patch) | |
| tree | afe87f0b767791fd6ae0c9c45ebbb38958ccf5a6 /src/modlist.cpp | |
| parent | f43b2284dd873761f9d0cd781df7db6f197cbfc9 (diff) | |
| parent | f7de8618124199977c4f4919e70bbfd2693ed341 (diff) | |
Merge branch 'master' of https://github.com/ModOrganizer2/modorganizer
Diffstat (limited to 'src/modlist.cpp')
| -rw-r--r-- | src/modlist.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp index 04abfb01..d7324e7f 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -860,9 +860,11 @@ void ModList::highlightMods(const QItemSelectionModel *selection, const MOShared if (fileEntry.get() != nullptr) { QString originName = QString::fromStdWString(directoryEntry.getOriginByID(fileEntry->getOrigin()).getName()); - - auto modInfo = ModInfo::getByName(originName); - modInfo->setPluginSelected(true); + const auto index = ModInfo::getIndex(originName); + if (index != UINT_MAX) { + auto modInfo = ModInfo::getByIndex(index); + modInfo->setPluginSelected(true); + } } } notifyChange(0, rowCount() - 1); |
