From 6bdf23dbcba8be294f835b74ca88d3d88adc9efe Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 24 Aug 2024 10:18:15 +0300 Subject: Skype: fix for occasional crash in group chats --- protocols/SkypeWeb/src/skype_chatrooms.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'protocols/SkypeWeb/src') 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); -- cgit v1.2.3