From fff6c9fc6c8ce7d5fc2aff3444073f4a6069944d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 22 Sep 2013 21:07:09 +0000 Subject: - crash fix; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@6189 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_svc.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'protocols/JabberG/src/jabber_svc.cpp') diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index df56450d5b..6c2bdb3d12 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -43,7 +43,7 @@ INT_PTR __cdecl CJabberProto::GetMyAwayMsg(WPARAM wParam, LPARAM lParam) TCHAR *szStatus = NULL; INT_PTR nRetVal = 0; - EnterCriticalSection(&m_csModeMsgMutex); + mir_cslock lck(m_csModeMsgMutex); switch (wParam ? (int)wParam : m_iStatus) { case ID_STATUS_ONLINE: szStatus = m_modeMsgs.szOnline; @@ -63,13 +63,11 @@ INT_PTR __cdecl CJabberProto::GetMyAwayMsg(WPARAM wParam, LPARAM lParam) case ID_STATUS_FREECHAT: szStatus = m_modeMsgs.szFreechat; break; - default: - // Should not reach here + default: // Should not reach here break; } if (szStatus) nRetVal = (lParam & SGMA_UNICODE) ? (INT_PTR)mir_t2u(szStatus) : (INT_PTR)mir_t2a(szStatus); - LeaveCriticalSection(&m_csModeMsgMutex); return nRetVal; } -- cgit v1.2.3