]> git.saurik.com Git - wxWidgets.git/commitdiff
Allow wxPropertyGridInterface::EnableProperty() to work even if property->GetGrid...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Mon, 4 Jan 2010 16:07:47 +0000 (16:07 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Mon, 4 Jan 2010 16:07:47 +0000 (16:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/propgridiface.cpp

index 93e44177390513b52cc62be6f9d65c9a8dbf5f85..cbef5d654ef8430965a7eef38d4d4981991bd91b 100644 (file)
@@ -270,7 +270,7 @@ bool wxPropertyGridInterface::EnableProperty( wxPGPropArg id, bool enable )
             return false;
 
         // If active, Set active Editor.
             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
             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.
             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 );
     }
 
             grid->DoSelectProperty( p, wxPG_SEL_FORCE );
     }