From 1103c4ca052302f246658efd86fc349f8717f828 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Thu, 3 Dec 2009 18:08:24 +0000 Subject: [PATCH] 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 --- src/propgrid/propgrid.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 0fb5a5bf92..498bfc4e2d 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -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. -- 2.45.2