]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
added missing return on error
[wxWidgets.git] / src / generic / grid.cpp
index 6a9750f96f44e180704e44fa5b669da1ae6cbf98..c547765a840ed0c3645d7d86e831206bca6a0208 100644 (file)
@@ -3503,6 +3503,8 @@ wxGrid::wxGrid( wxWindow *parent,
 
 wxGrid::~wxGrid()
 {
 
 wxGrid::~wxGrid()
 {
+    // Must do this or ~wxScrollHelper will pop the wrong event handler
+    SetTargetWindow(this);
     ClearAttrCache();
     wxSafeDecRef(m_defaultCellAttr);
 
     ClearAttrCache();
     wxSafeDecRef(m_defaultCellAttr);