From d3e9dd94092a11f584cc29b03dea5dd4b3424ce4 Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Sun, 6 Feb 2005 17:10:01 +0000 Subject: [PATCH] fixed double delete in UpdateAttrRows/Cols introduced by patch 1104355. [ Only the change for UpdateAttrRowsOrCols was valid. ] git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 65d60341f8..dad2139822 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -2431,7 +2431,8 @@ void wxGridCellAttrData::UpdateAttrRows( size_t pos, int numRows ) else { // ...or remove the attribute - m_attrs[n].attr->DecRef(); + // No need to DecRef the attribute itself since this is + // done be wxGridCellWithAttr's destructor! m_attrs.RemoveAt(n); n--; count--; } @@ -2465,7 +2466,8 @@ void wxGridCellAttrData::UpdateAttrCols( size_t pos, int numCols ) else { // ...or remove the attribute - m_attrs[n].attr->DecRef(); + // No need to DecRef the attribute itself since this is + // done be wxGridCellWithAttr's destructor! m_attrs.RemoveAt(n); n--; count--; }