summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-07-10 13:41:31 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-07-10 13:41:36 +0300
commit8b086f087b4806d959e5769e63da9134c42edb20 (patch)
tree913b99eff056dd732ee553cf63c13763915cd003 /protocols
parentf3f8ab10fac73bf41741cff225ba3f25b937179c (diff)
fixes #4524 (Discord: падение после входа и выхода с сервера)
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Discord/src/dispatch.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp
index cab63a8d44..ac2c886857 100644
--- a/protocols/Discord/src/dispatch.cpp
+++ b/protocols/Discord/src/dispatch.cpp
@@ -277,7 +277,8 @@ void CDiscordProto::OnCommandGuildDeleted(const JSONNode &pRoot)
for (auto &it : arUsers.rev_iter())
if (it->pGuild == pGuild) {
- db_delete_contact(it->si->hContact);
+ if (it->si)
+ db_delete_contact(it->si->hContact);
arUsers.removeItem(&it);
}