diff options
-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);
|