diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 8634a74f8a..1481cda78c 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -632,7 +632,7 @@ bool wxListCtrl::SetItem(wxListItem& info) // check whether it has any custom attributes if ( info.HasAttributes() ) { - m_attrs.Delete(item.iItem); // remove existing attributes + delete m_attrs.Delete(item.iItem); // remove existing attributes m_attrs.Put(item.iItem, (wxObject *)new wxListItemAttr(*info.GetAttributes())); m_hasAnyAttr = TRUE;