From: Vadim Zeitlin Date: Sun, 25 Nov 2012 23:17:10 +0000 (+0000) Subject: Don't dereference NULL output pointer in wxTextMeasure. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d76774b44459b180cdc0986865f483cbd1b7ab00?ds=inline Don't dereference NULL output pointer in wxTextMeasure. Check that pointers are non-NULL before assigning 0 to them. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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; }