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:
Jaakko Salli
2010-01-04 16:07:47 +00:00
parent 4b621e4ce4
commit 7f344b3b80

View File

@@ -270,7 +270,7 @@ bool wxPropertyGridInterface::EnableProperty( wxPGPropArg id, bool enable )
return false;
// 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 );
}
else
@@ -279,7 +279,7 @@ bool wxPropertyGridInterface::EnableProperty( wxPGPropArg id, bool enable )
return false;
// 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 );
}