diff options
author | George Hazan <george.hazan@gmail.com> | 2024-08-24 10:18:15 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-08-24 10:18:15 +0300 |
commit | 6bdf23dbcba8be294f835b74ca88d3d88adc9efe (patch) | |
tree | 3c3d4e091b4b0cedda4f155fef5ec9b62c0342dd /protocols/SkypeWeb/src | |
parent | 1acf5945ac73bf75a716551879e3d3e71217c03b (diff) |
Skype: fix for occasional crash in group chats
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r-- | protocols/SkypeWeb/src/skype_chatrooms.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp index 0f04ba1793..4df199e3f0 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -352,8 +352,11 @@ void CSkypeProto::OnGetChatMembers(MHttpResponse *response, AsyncHttpRequest *pR for (auto &it : root["profiles"]) {
CMStringW wszUserId(Utf2T(it.name()));
- if (auto *pUser = g_chatApi.UM_FindUser(si, wszUserId))
- replaceStrW(pUser->pszNick, it["profile"]["displayName"].as_mstring());
+ if (auto *pUser = g_chatApi.UM_FindUser(si, wszUserId)) {
+ auto &pProfile = it["profile"];
+ if (auto &pName = pProfile["displayName"])
+ replaceStrW(pUser->pszNick, pName.as_mstring());
+ }
}
g_chatApi.OnChangeNick(si);
|