Allow wxPropertyGridInterface::EnableProperty() to work even if property->GetGrid() returns NULL.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -270,7 +270,7 @@ bool wxPropertyGridInterface::EnableProperty( wxPGPropArg id, bool enable )
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// If active, Set active Editor.
|
// If active, Set active Editor.
|
||||||
if ( grid->GetState() == state && p == grid->GetSelection() )
|
if ( grid && grid->GetState() == state && p == grid->GetSelection() )
|
||||||
grid->DoSelectProperty( p, wxPG_SEL_FORCE );
|
grid->DoSelectProperty( p, wxPG_SEL_FORCE );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -279,7 +279,7 @@ bool wxPropertyGridInterface::EnableProperty( wxPGPropArg id, bool enable )
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// If active, Disable as active Editor.
|
// If active, Disable as active Editor.
|
||||||
if ( grid->GetState() == state && p == grid->GetSelection() )
|
if ( grid && grid->GetState() == state && p == grid->GetSelection() )
|
||||||
grid->DoSelectProperty( p, wxPG_SEL_FORCE );
|
grid->DoSelectProperty( p, wxPG_SEL_FORCE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user