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/trunk@55798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4532,6 +4532,11 @@ bool wxGrid::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
wxGrid::~wxGrid()
|
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
|
// Must do this or ~wxScrollHelper will pop the wrong event handler
|
||||||
SetTargetWindow(this);
|
SetTargetWindow(this);
|
||||||
ClearAttrCache();
|
ClearAttrCache();
|
||||||
|
Reference in New Issue
Block a user