diff options
author | George Hazan <ghazan@miranda.im> | 2017-02-23 15:36:23 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-02-23 15:36:34 +0300 |
commit | bbb4ba8b737a4c3aaf165392f1d4919c0147b834 (patch) | |
tree | b04562d7b3836fec85edaa1a6e8fc115027e119a | |
parent | 6e1c3bb16e5b0d396810a1a534f4854d55bcf4ac (diff) |
fix for strange crash in StdMsg
-rw-r--r-- | src/core/stdmsg/src/chat_window.cpp | 2 |
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; |