From ed499945b795b6890e26430d761012c37c432c62 Mon Sep 17 00:00:00 2001
From: George Hazan <ghazan@miranda.im>
Date: Tue, 27 Mar 2018 20:08:42 +0300
Subject: Jabber: crash fix for mood selection dialog

---
 protocols/JabberG/src/jabber_xstatus.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'protocols/JabberG/src')

diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp
index 4f6c768a05..09de8a92b6 100644
--- a/protocols/JabberG/src/jabber_xstatus.cpp
+++ b/protocols/JabberG/src/jabber_xstatus.cpp
@@ -310,8 +310,8 @@ BOOL CJabberDlgPepSimple::OnWmMeasureItem(UINT, WPARAM, LPARAM lParam)
 	ReleaseDC(m_cbModes.GetHwnd(), hdc);
 
 	lpmis->itemHeight = max(tm.tmHeight, 18);
-	if (lpmis->itemHeight < 18) lpmis->itemHeight = 18;
-
+	if (lpmis->itemHeight < 18)
+		lpmis->itemHeight = 18;
 	return TRUE;
 }
 
@@ -324,7 +324,7 @@ BOOL CJabberDlgPepSimple::OnWmDrawItem(UINT, WPARAM, LPARAM lParam)
 	if (lpdis->itemData == -1)
 		return FALSE;
 
-	CStatusMode *mode = &m_modes[lpdis->itemData];
+	CStatusMode *mode = (CStatusMode *)lpdis->itemData;
 
 	TEXTMETRIC tm = { 0 };
 	GetTextMetrics(lpdis->hDC, &tm);
-- 
cgit v1.2.3