From: Jaakko Salli Date: Mon, 4 Jan 2010 16:07:47 +0000 (+0000) Subject: Allow wxPropertyGridInterface::EnableProperty() to work even if property->GetGrid... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7f344b3b80a1873d49937c2865f6b01ac76981bd 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 --- diff --git a/src/propgrid/propgridiface.cpp b/src/propgrid/propgridiface.cpp index 93e4417739..cbef5d654e 100644 --- a/src/propgrid/propgridiface.cpp +++ b/src/propgrid/propgridiface.cpp @@ -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 ); }