X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e0da9e871a3184daa1a32bcacbfdf6ddb9ed7db4..95316a3f245a4baf3046e97222660bed986153ed:/src/gtk/textmeasure.cpp diff --git a/src/gtk/textmeasure.cpp b/src/gtk/textmeasure.cpp index 7320111f0e..eafd06848d 100644 --- a/src/gtk/textmeasure.cpp +++ b/src/gtk/textmeasure.cpp @@ -116,8 +116,11 @@ void wxTextMeasure::DoGetTextExtent(const wxString& string, { if ( !m_context ) { - *width = - *height = 0; + if ( width ) + *width = 0; + + if ( height ) + *height = 0; return; } @@ -162,8 +165,11 @@ void wxTextMeasure::DoGetTextExtent(const wxString& string, bool wxTextMeasure::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths, - double WXUNUSED(scaleX)) + double scaleX) { + if ( !m_layout ) + return wxTextMeasureBase::DoGetPartialTextExtents(text, widths, scaleX); + // Set layout's text const wxCharBuffer dataUTF8 = wxGTK_CONV_FONT(text, GetFont()); if ( !dataUTF8 )