summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-02-23 15:36:23 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-02-23 15:36:34 +0300
commitbbb4ba8b737a4c3aaf165392f1d4919c0147b834 (patch)
treeb04562d7b3836fec85edaa1a6e8fc115027e119a
parent6e1c3bb16e5b0d396810a1a534f4854d55bcf4ac (diff)
fix for strange crash in StdMsg
-rw-r--r--src/core/stdmsg/src/chat_window.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp
index f0916199ab..af4ea35a85 100644
--- a/src/core/stdmsg/src/chat_window.cpp
+++ b/src/core/stdmsg/src/chat_window.cpp
@@ -1705,6 +1705,8 @@ LABEL_SHOWWINDOW:
tr.chrg.cpMin = start;
tr.chrg.cpMax = end;
long iRes = SendDlgItemMessage(m_hwnd, IDC_LOG, EM_GETTEXTRANGE, 0, (LPARAM)&tr);
+ if (pszWord[0] == 0)
+ break;
if (iRes > 0)
for (size_t iLen = mir_wstrlen(pszWord) - 1; wcschr(szTrimString, pszWord[iLen]); iLen--)
pszWord[iLen] = 0;