summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-08-15 13:49:37 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-08-15 13:49:37 +0300
commitf52b5cc86d9eff2494902157c8fc0a4e019a3c95 (patch)
tree9f668bf7b89decd53757589d74e476aac81eb451 /protocols/WhatsApp/src
parentd05dd78157058eea348f0d7666c7c6b0570ef25b (diff)
fixes #799 (Crash on receiving msg in FB group chat)
Diffstat (limited to 'protocols/WhatsApp/src')
-rw-r--r--protocols/WhatsApp/src/utils.cpp11
1 files changed, 4 insertions, 7 deletions
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)