From cd4b15e52358b4563f89b865e0ba7f7bc55ab6b1 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Sun, 27 Sep 2009 14:39:03 +0000 Subject: [PATCH] Do not process editor control events when propgrid event is currently being processed. Doing otherwise could lead to a crash if application is doing something time-consuming (such as displaying a message box) in the event handler. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/propgrid.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index e941c2a6c1..a366de4640 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -3334,7 +3334,12 @@ void wxPropertyGrid::HandleCustomEditorEvent( wxEvent &event ) // Somehow, event is handled after property has been deselected. // Possibly, but very rare. - if ( !selected || selected->HasFlag(wxPG_PROP_BEING_DELETED) ) + if ( !selected || + selected->HasFlag(wxPG_PROP_BEING_DELETED) || + // Also don't handle editor event if wxEVT_PG_CHANGED or + // similar is currently doing something (showing a + // message box, for instance). + m_processedEvent ) return; if ( m_iFlags & wxPG_FL_IN_HANDLECUSTOMEDITOREVENT ) -- 2.47.2