summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authormal@chromium.org <mal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 06:33:44 +0000
committermal@chromium.org <mal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 06:33:44 +0000
commitfcd58d1762447670f2acfbcd7d377cbfd16b7541 (patch)
tree15ab0e22be5dc2b537523d6bdb31e815d1797c7a /views
parentae7e69ad7dc6ae0241e41d9b51dd5cceb83d4037 (diff)
downloadchromium_src-fcd58d1762447670f2acfbcd7d377cbfd16b7541.zip
chromium_src-fcd58d1762447670f2acfbcd7d377cbfd16b7541.tar.gz
chromium_src-fcd58d1762447670f2acfbcd7d377cbfd16b7541.tar.bz2
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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33055 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/table/table_view.cc10
-rw-r--r--views/controls/table/table_view.h3
2 files changed, 0 insertions, 13 deletions
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.