Avoid comparing address of reference to NULL

(backport of 01ccff2e05)
This commit is contained in:
Paul Cornett
2016-02-26 10:39:02 -08:00
parent 47fd8835cf
commit 9dccf621c8

View File

@@ -477,13 +477,13 @@ void wxPGProperty::Init()
void wxPGProperty::Init( const wxString& label, const wxString& name ) void wxPGProperty::Init( const wxString& label, const wxString& name )
{ {
// We really need to check if &label and &name are NULL pointers // wxPG_LABEL reference can be NULL if we are called before property
// (this can if we are called before property grid has been initalized) // grid has been initialized
if ( (&label) != NULL && label != wxPG_LABEL ) if ( sm_wxPG_LABEL && label != wxPG_LABEL )
m_label = label; m_label = label;
if ( (&name) != NULL && name != wxPG_LABEL ) if ( sm_wxPG_LABEL && name != wxPG_LABEL )
DoSetName( name ); DoSetName( name );
else else
DoSetName( m_label ); DoSetName( m_label );