diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-01-16 12:30:46 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-01-16 12:30:46 +0000 |
commit | 2e91bcd93a07427adbf3dd666708702611ac5c3e (patch) | |
tree | 83e00a18d680a26d39e30fb9038ca8ecc067d6ef /protocols | |
parent | 78f816ea826eee970c84fd1f9c43d8d3445540a8 (diff) |
Jabber: fixed crash related mood message (thanks Awkward)
git-svn-id: http://svn.miranda-ng.org/main/trunk@3118 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/JabberG/src/jabber_xstatus.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index e7e19cf2e2..9974f080ca 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -1436,10 +1436,10 @@ INT_PTR __cdecl CJabberProto::OnSetXStatusEx(WPARAM wParam, LPARAM lParam) CPepMood *pepMood = (CPepMood*)m_pepServices.Find(_T(JABBER_FEAT_USER_MOOD));
- int status = *pData->status;
+ int status = (pData->flags & CSSF_MASK_STATUS) ? *pData->status : pepMood->m_mode;
if (status >= 0 && status < SIZEOF(g_arrMoods)) {
pepMood->m_mode = status;
- pepMood->m_text = JabberStrFixLines(pData->ptszMessage);
+ pepMood->m_text = (pData->flags & CSSF_MASK_MESSAGE) ? JabberStrFixLines(pData->ptszMessage) : _T("");
pepMood->LaunchSetGui(1);
return 0;
}
|