diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-20 16:12:32 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-20 16:12:32 +0300 |
commit | 933be66941a98a8bbeb9729a06f2a589a08ea15c (patch) | |
tree | 7aaad978549ce7a147f04b387f730a0215ce59ff /protocols/ICQ-WIM/src | |
parent | 4dad3f7d4adaaddcf2493c49ad1d094374d68104 (diff) |
fixes #3938 (ICQ: crash)
Diffstat (limited to 'protocols/ICQ-WIM/src')
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index d85bcc3365..cc63593a3a 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -339,9 +339,9 @@ MCONTACT CIcqProto::ParseBuddyInfo(const JSONNode &buddy, MCONTACT hContact, boo // user chat?
CMStringW wszId(buddy["aimId"].as_mstring());
if (IsChat(wszId)) {
- auto *pUser = FindUser(wszId);
- if (pUser && pUser->m_iApparentMode == ID_STATUS_OFFLINE)
- return INVALID_CONTACT_ID;
+ if (auto *pUser = FindUser(wszId))
+ if (pUser->m_iApparentMode == ID_STATUS_OFFLINE)
+ return INVALID_CONTACT_ID;
CMStringW wszChatName(buddy["friendly"].as_mstring());
auto *si = CreateGroupChat(wszId, wszChatName);
@@ -353,8 +353,10 @@ MCONTACT CIcqProto::ParseBuddyInfo(const JSONNode &buddy, MCONTACT hContact, boo if (bIgnored)
return INVALID_CONTACT_ID;
+ debugLogA("creating a user with id=%S", wszId.c_str());
hContact = CreateContact(wszId, false);
- FindUser(wszId)->m_bInList = true;
+ if (auto *pUser = FindUser(wszId))
+ pUser->m_bInList = true;
}
else if (bIgnored) {
db_delete_contact(hContact, true);
|