Applied [ 1283696 ] wxDC::GetPartialTextExtents crashes on empty strings

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2005-09-11 18:37:52 +00:00
parent f277ea12a6
commit f9daf953d6

View File

@@ -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