summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-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;