don't crash if the grid is being deleted while a cell editor is still shown (closes #9991)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@55798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-09-22 16:12:46 +00:00
parent 17b4b59c85
commit 71e9f07df1

View File

@@ -4315,6 +4315,11 @@ bool wxGrid::Create(wxWindow *parent, wxWindowID id,
wxGrid::~wxGrid()
{
// Ensure that the editor control is destroyed before the grid is,
// otherwise we crash later when the editor tries to do something with the
// half destroyed grid
HideCellEditControl();
// Must do this or ~wxScrollHelper will pop the wrong event handler
SetTargetWindow(this);
ClearAttrCache();