diff options
Diffstat (limited to 'ui/gfx/icon_util.cc')
-rw-r--r-- | ui/gfx/icon_util.cc | 4 |
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); |