aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2005-05-27 00:12:27 +0000
committernyamatongwe <devnull@localhost>2005-05-27 00:12:27 +0000
commitc1a1a36d40499bb35ddfce40a131f1b7e7a9ff4f (patch)
tree1d9702a5bd8ed4391e553b9e46b9ebf5fde4f69e
parent6decff0a953904d1ae756a816ebb46eac28c0d59 (diff)
downloadscintilla-mirror-c1a1a36d40499bb35ddfce40a131f1b7e7a9ff4f.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);