diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index eb8b35a402..443bcdbb8b 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -1782,17 +1782,25 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con #endif { wxCharBuffer buff = text.mb_str(wxConvLocal); - size_t len = strlen(buff); - short* measurements = new short[len+1]; - MeasureText(len, buff.data(), measurements); + if ( buff.data() == 0 ) + { + for (size_t i=0; i