summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;
}
}