diff --git a/src/gtk/textmeasure.cpp b/src/gtk/textmeasure.cpp index 7320111f0e..48bec42aa5 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; }