From 9fdc420ff950ee0ff46b136d452502a382781f08 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 27 May 2005 00:12:27 +0000 Subject: Fix crash with empty autocompletion argument. --- win32/PlatWin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3