summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-07 20:30:23 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-07 20:30:23 +0000
commit87420943edf22ecf8fb346e317ba2b24d9050002 (patch)
tree05611b246b31fa2a6cbd484d0f48800ac709965e
parent882b946ed75dea691c20d23b41b5e9c805ee1860 (diff)
fix for rare crash in tabSRMM muc highlight
git-svn-id: http://svn.miranda-ng.org/main/trunk@8064 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/TabSRMM/src/chat/muchighlight.cpp5
1 files changed, 4 insertions, 1 deletions
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);