]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
HUGE commit of ifacecheck-automated fixes to virtualness/constness/staticness of...
[wxWidgets.git] / src / generic / grid.cpp
index e8ca4e0102b6308b6c98b572587a907a9b1954dc..708baf71b01ba0e1974229c6411a461d0ec9c4c5 100644 (file)
@@ -4532,6 +4532,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();