diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index f843360fcf..ad20e6ec9b 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -1674,6 +1674,8 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con widths.Empty(); widths.Add(0, stlen); // fill the array with zeros + if (stlen == 0) + return true; if (!::GetTextExtentExPoint(GetHdc(), text.c_str(), // string to check