From 2e91bcd93a07427adbf3dd666708702611ac5c3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Wed, 16 Jan 2013 12:30:46 +0000 Subject: Jabber: fixed crash related mood message (thanks Awkward) git-svn-id: http://svn.miranda-ng.org/main/trunk@3118 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_xstatus.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/JabberG') 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; } -- cgit v1.2.3