summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Discord/src/dispatch.cpp5
-rw-r--r--protocols/IcqOscarJ/src/cookies.cpp5
2 files changed, 6 insertions, 4 deletions
diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp
index be99ebf054..33cf2fe556 100644
--- a/protocols/Discord/src/dispatch.cpp
+++ b/protocols/Discord/src/dispatch.cpp
@@ -194,10 +194,11 @@ void CDiscordProto::OnCommandGuildDeleted(const JSONNode &pRoot)
if (pGuild == nullptr)
return;
- for (auto &it : arUsers.rev_iter())
+ auto T = arUsers.rev_iter();
+ for (auto &it : T)
if (it->guildId == pGuild->id) {
Chat_Terminate(m_szModuleName, it->wszUsername, true);
- arUsers.remove(it);
+ arUsers.remove(T.indexOf(&it));
}
Chat_Terminate(m_szModuleName, pRoot["name"].as_mstring(), true);
diff --git a/protocols/IcqOscarJ/src/cookies.cpp b/protocols/IcqOscarJ/src/cookies.cpp
index de73d58e03..a517f93923 100644
--- a/protocols/IcqOscarJ/src/cookies.cpp
+++ b/protocols/IcqOscarJ/src/cookies.cpp
@@ -33,9 +33,10 @@ void CIcqProto::RemoveExpiredCookies()
{
time_t tNow = time(nullptr);
- for (auto &it : cookies.rev_iter())
+ auto T = cookies.rev_iter();
+ for (auto &it : T)
if (it->dwTime + COOKIE_TIMEOUT < tNow)
- cookies.remove(it);
+ cookies.remove(T.indexOf(&it));
}
// Generate and allocate cookie