summaryrefslogtreecommitdiff
path: root/src/modinfo.cpp
diff options
context:
space:
mode:
authorJeremy Rimpo <jeremy.rimpo@servermonkey.com>2020-09-09 14:15:22 -0500
committerJeremy Rimpo <jeremy.rimpo@servermonkey.com>2020-09-09 14:15:22 -0500
commit95b1c13dc644f6ebfc41b1881fd89cccd7104a74 (patch)
tree86e0695be5cd2878510760acb498760387eb8e0d /src/modinfo.cpp
parentd30d966500525cfe3137044c97db024230aac802 (diff)
Don't always increment
Diffstat (limited to 'src/modinfo.cpp')
-rw-r--r--src/modinfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp
index b79ed657..aef150df 100644
--- a/src/modinfo.cpp
+++ b/src/modinfo.cpp
@@ -313,7 +313,7 @@ bool ModInfo::checkAllForUpdate(PluginContainer *pluginContainer, QObject *recei
}
// Detect invalid source games
- for (auto itr = games.begin(); itr != games.end(); ++itr) {
+ for (auto itr = games.begin(); itr != games.end();) {
auto gamePlugins = pluginContainer->plugins<IPluginGame>();
IPluginGame* gamePlugin = qApp->property("managed_game").value<IPluginGame*>();
for (auto plugin : gamePlugins) {
@@ -325,6 +325,8 @@ bool ModInfo::checkAllForUpdate(PluginContainer *pluginContainer, QObject *recei
if (gamePlugin != nullptr && gamePlugin->gameNexusName().isEmpty()) {
log::warn("{}", tr("The update check has found a mod with a Nexus ID and source game of %1, but this game is not a valid Nexus source.").arg(gamePlugin->gameName()));
itr = games.erase(itr);
+ } else {
+ ++itr;
}
}