From 0df36b7662f11609c10553c5ffe72aa280d75c2f Mon Sep 17 00:00:00 2001 From: "mal@chromium.org" Date: Wed, 25 Nov 2009 08:06:03 +0000 Subject: Merge 33055 - Avoid double freeing image list in TableView. Committing http://codereview.chromium.org/387056 on behalf of Dan. BUG=27729 TEST=run NullModelTableViewTest.NullModel in app verifier or wine TBR= dank,jhawkins Review URL: http://codereview.chromium.org/437054 TBR=mal@chromium.org Review URL: http://codereview.chromium.org/442001 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@33060 0039d316-1c4b-4281-b951-d872f2087c98 --- views/controls/table/table_view.cc | 10 ---------- views/controls/table/table_view.h | 3 --- 2 files changed, 13 deletions(-) (limited to 'views') diff --git a/views/controls/table/table_view.cc b/views/controls/table/table_view.cc index 114019f..35a2399 100644 --- a/views/controls/table/table_view.cc +++ b/views/controls/table/table_view.cc @@ -1074,16 +1074,6 @@ LRESULT TableView::OnNotify(int w_param, LPNMHDR hdr) { return 0; } -void TableView::OnDestroy() { - if (table_type_ == ICON_AND_TEXT) { - HIMAGELIST image_list = - ListView_GetImageList(GetNativeControlHWND(), LVSIL_SMALL); - DCHECK(image_list); - if (image_list) - ImageList_Destroy(image_list); - } -} - // Returns result, unless ascending is false in which case -result is returned. static int SwapCompareResult(int result, bool ascending) { return ascending ? result : -result; diff --git a/views/controls/table/table_view.h b/views/controls/table/table_view.h index a1cce45d..282d590 100644 --- a/views/controls/table/table_view.h +++ b/views/controls/table/table_view.h @@ -276,9 +276,6 @@ class TableView : public NativeControl, virtual LRESULT OnNotify(int w_param, LPNMHDR l_param); - // Overriden to destroy the image list. - virtual void OnDestroy(); - // Used to sort the two rows. Returns a value < 0, == 0 or > 0 indicating // whether the row2 comes before row1, row2 is the same as row1 or row1 comes // after row2. This invokes CompareValues on the model with the sorted column. -- cgit v1.1