Handle the rare case where wxPropertyGrid::HandleCustomEditorEvent() may receive event before the grid state has been initialized.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-12-03 18:08:24 +00:00
parent cff9681b85
commit 1103c4ca05

View File

@@ -3278,6 +3278,12 @@ bool wxPropertyGrid::DoEditorValidate()
void wxPropertyGrid::HandleCustomEditorEvent( wxEvent &event )
{
// It is possible that this handler receives event even before
// the control has been properly initialized. Let's skip the
// event handling in that case.
if ( !m_pState )
return;
wxPGProperty* selected = GetSelection();
// Somehow, event is handled after property has been deselected.