From 95b1c13dc644f6ebfc41b1881fd89cccd7104a74 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Wed, 9 Sep 2020 14:15:22 -0500 Subject: Don't always increment --- src/modinfo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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* gamePlugin = qApp->property("managed_game").value(); 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; } } -- cgit v1.3.1