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 )
{
// We really need to check if &label and &name are NULL pointers
// (this can if we are called before property grid has been initalized)
// wxPG_LABEL reference can be NULL if we are called before property
// grid has been initialized
if ( (&label) != NULL && label != wxPG_LABEL )
if ( sm_wxPG_LABEL && label != wxPG_LABEL )
m_label = label;
if ( (&name) != NULL && name != wxPG_LABEL )
if ( sm_wxPG_LABEL && name != wxPG_LABEL )
DoSetName( name );
else
DoSetName( m_label );