diff options
author | George Hazan <ghazan@miranda.im> | 2017-08-15 13:49:37 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-08-15 13:49:37 +0300 |
commit | f52b5cc86d9eff2494902157c8fc0a4e019a3c95 (patch) | |
tree | 9f668bf7b89decd53757589d74e476aac81eb451 /protocols/WhatsApp/src | |
parent | d05dd78157058eea348f0d7666c7c6b0570ef25b (diff) |
fixes #799 (Crash on receiving msg in FB group chat)
Diffstat (limited to 'protocols/WhatsApp/src')
-rw-r--r-- | protocols/WhatsApp/src/utils.cpp | 11 |
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)
|