From 7f344b3b80a1873d49937c2865f6b01ac76981bd Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Mon, 4 Jan 2010 16:07:47 +0000 Subject: [PATCH] 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 --- src/propgrid/propgridiface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); } -- 2.45.2