summaryrefslogtreecommitdiffstats
path: root/ui/gfx/icon_util.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-21 21:16:53 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-21 21:16:53 +0000
commitde694152f5018dca58768210aa01a6dc4eb7100d (patch)
treeeccfe7196e8e0787599d7e3ce41026a14aaeb780 /ui/gfx/icon_util.cc
parent8cbf876ce28972b4dd62ac4e2ee0dd34de1a2c02 (diff)
downloadchromium_src-de694152f5018dca58768210aa01a6dc4eb7100d.zip
chromium_src-de694152f5018dca58768210aa01a6dc4eb7100d.tar.gz
chromium_src-de694152f5018dca58768210aa01a6dc4eb7100d.tar.bz2
gfx: Delete another array pointer through scoped_array.
TEST=ui_unittests R=sky@chromium.org Review URL: https://codereview.chromium.org/10952026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158081 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/icon_util.cc')
-rw-r--r--ui/gfx/icon_util.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/ui/gfx/icon_util.cc b/ui/gfx/icon_util.cc
index b6652f0..740f841 100644
--- a/ui/gfx/icon_util.cc
+++ b/ui/gfx/icon_util.cc
@@ -195,8 +195,7 @@ SkBitmap IconUtil::CreateSkBitmapFromHICONHelper(HICON icon,
// Capture boolean opacity. We may not use it if we find out the bitmap has
// an alpha channel.
- bool* opaque = new bool[num_pixels];
- DCHECK(opaque);
+ scoped_array<bool> opaque(new bool[num_pixels]);
for (size_t i = 0; i < num_pixels; ++i)
opaque[i] = !bits[i];
@@ -222,7 +221,6 @@ SkBitmap IconUtil::CreateSkBitmapFromHICONHelper(HICON icon,
}
}
- delete [] opaque;
::SelectObject(dib_dc, old_obj);
::DeleteObject(dib);
::DeleteDC(dib_dc);