diff options
| author | Qudix <17361645+Qudix@users.noreply.github.com> | 2020-11-14 19:45:23 -0600 |
|---|---|---|
| committer | Qudix <17361645+Qudix@users.noreply.github.com> | 2020-11-14 19:45:23 -0600 |
| commit | 67188a39cb6aa9d1cad172aec6aac9977af8e79a (patch) | |
| tree | 3e4e31887a57b49747c31c342077a164025f9066 /src/modlist.cpp | |
| parent | b9ec979b4c884b35981d0d6fe0abe914e00daa54 (diff) | |
| parent | 4833e494d56b351e52423f2835a7a91ab8c284b6 (diff) | |
Merge branch 'master' of https://github.com/ModOrganizer2/modorganizer into tracking_integration
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); |
