From 87420943edf22ecf8fb346e317ba2b24d9050002 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 7 Feb 2014 20:30:23 +0000 Subject: fix for rare crash in tabSRMM muc highlight git-svn-id: http://svn.miranda-ng.org/main/trunk@8064 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/chat/muchighlight.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/TabSRMM/src/chat/muchighlight.cpp b/plugins/TabSRMM/src/chat/muchighlight.cpp index 796a8b5a88..cd25c3d063 100644 --- a/plugins/TabSRMM/src/chat/muchighlight.cpp +++ b/plugins/TabSRMM/src/chat/muchighlight.cpp @@ -122,7 +122,10 @@ int CMUCHighlight::match(const GCEVENT *pgce, const SESSION_INFO *psi, DWORD dwF return 0; if ((m_dwFlags & MATCH_TEXT) && (dwFlags & MATCH_TEXT) && (m_fHighlightMe || m_iTextPatterns > 0) && psi != 0) { - TCHAR *p = NEWTSTR_ALLOCA(pci->RemoveFormatting(pgce->ptszText)); + TCHAR *p = pci->RemoveFormatting(pgce->ptszText); + p = NEWTSTR_ALLOCA(p); + if (p == NULL) + return 0; CharLower(p); TCHAR *tszMe = ((psi && psi->pMe) ? NEWTSTR_ALLOCA(psi->pMe->pszNick) : 0); -- cgit v1.2.3