]> git.saurik.com Git - wxWidgets.git/commitdiff
Handle the rare case where wxPropertyGrid::HandleCustomEditorEvent() may receive...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Thu, 3 Dec 2009 18:08:24 +0000 (18:08 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Thu, 3 Dec 2009 18:08:24 +0000 (18:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/propgrid.cpp

index 0fb5a5bf9205f39374bce85343182e1acc8d6b06..498bfc4e2de3e89c553cfcf3d2fc3f2b4008237d 100644 (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.