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:
@@ -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
|
||||
|
Reference in New Issue
Block a user