X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3b9f782ef3949f583e8ac53795d36787f044fc3..12b5f4b4d2d8a07962da7ba3b78c8c1ec2634a67:/src/propgrid/propgrid.cpp diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index b8466f0ea6..56738c1635 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -3219,16 +3219,18 @@ void wxPropertyGrid::FreeEditors() // Do not free editors immediately if processing events if ( m_wndEditor2 ) { - m_wndEditor2->PopEventHandler(true); + wxEvtHandler* handler = m_wndEditor2->PopEventHandler(false); m_wndEditor2->Hide(); + wxPendingDelete.Append( handler ); wxPendingDelete.Append( m_wndEditor2 ); m_wndEditor2 = NULL; } if ( m_wndEditor ) { - m_wndEditor->PopEventHandler(true); + wxEvtHandler* handler = m_wndEditor->PopEventHandler(false); m_wndEditor->Hide(); + wxPendingDelete.Append( handler ); wxPendingDelete.Append( m_wndEditor ); m_wndEditor = NULL; }