From f52b5cc86d9eff2494902157c8fc0a4e019a3c95 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 15 Aug 2017 13:49:37 +0300 Subject: fixes #799 (Crash on receiving msg in FB group chat) --- protocols/WhatsApp/src/utils.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'protocols/WhatsApp/src') diff --git a/protocols/WhatsApp/src/utils.cpp b/protocols/WhatsApp/src/utils.cpp index c0bfdfc558..7ae1c8fcfa 100644 --- a/protocols/WhatsApp/src/utils.cpp +++ b/protocols/WhatsApp/src/utils.cpp @@ -47,13 +47,10 @@ std::string getLastErrorMsg() void utils::setStatusMessage(MCONTACT hContact, const wchar_t *ptszMessage) { - if (ptszMessage != NULL) { - StatusTextData st = { 0 }; - st.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE); - wcsncpy_s(st.tszText, ptszMessage, _TRUNCATE); - CallService(MS_MSG_SETSTATUSTEXT, hContact, (LPARAM)&st); - } - else CallService(MS_MSG_SETSTATUSTEXT, hContact, NULL); + if (ptszMessage != nullptr) + Srmm_SetStatusText(hContact, ptszMessage, Skin_LoadIcon(SKINICON_EVENT_MESSAGE)); + else + Srmm_SetStatusText(hContact, nullptr); } BYTE* utils::md5string(const BYTE *data, int size, BYTE *digest) -- cgit v1.2.3