diff options
Diffstat (limited to 'protocols/Discord/src')
-rw-r--r-- | protocols/Discord/src/dispatch.cpp | 5 |
1 files changed, 3 insertions, 2 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); |