aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2005-05-27 00:12:27 +0000
committernyamatongwe <unknown>2005-05-27 00:12:27 +0000
commit9fdc420ff950ee0ff46b136d452502a382781f08 (patch)
tree1d9702a5bd8ed4391e553b9e46b9ebf5fde4f69e
parent0a2ba0261ab49efaa90b8522ab1d32947843577f (diff)
downloadscintilla-mirror-9fdc420ff950ee0ff46b136d452502a382781f08.tar.gz
Fix crash with empty autocompletion argument.
-rw-r--r--win32/PlatWin.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index d3de3c9ad..c7435f212 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -1118,7 +1118,7 @@ PRectangle ListBoxX::GetDesiredRect() {
HDC hdc = ::GetDC(lb);
HFONT oldFont = SelectFont(hdc, fontCopy);
SIZE textSize = {0, 0};
- int len = strlen(widestItem);
+ int len = widestItem ? strlen(widestItem) : 0;
if (unicodeMode) {
wchar_t tbuf[MAX_US_LEN];
int tlen = UCS2FromUTF8(widestItem, len, tbuf, sizeof(tbuf)/sizeof(wchar_t)-1);