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
This commit is contained in:
@@ -116,7 +116,10 @@ void wxTextMeasure::DoGetTextExtent(const wxString& string,
|
|||||||
{
|
{
|
||||||
if ( !m_context )
|
if ( !m_context )
|
||||||
{
|
{
|
||||||
*width =
|
if ( width )
|
||||||
|
*width = 0;
|
||||||
|
|
||||||
|
if ( height )
|
||||||
*height = 0;
|
*height = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user