Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2681)

Unified Diff: printing/image_win.cc

Issue 1406403007: Eliminate HICON leaks caused by creating icons from bitmap image. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « printing/emf_win.cc ('k') | remoting/host/desktop_shape_tracker_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/image_win.cc
diff --git a/printing/image_win.cc b/printing/image_win.cc
index 398fb221c4c97a6636ff6faa6ac8a12a1b14511c..1584efb1a72be7f4502cd6829fd46476de1a05b7 100644
--- a/printing/image_win.cc
+++ b/printing/image_win.cc
@@ -70,8 +70,8 @@ bool Image::LoadMetafile(const Metafile& metafile) {
base::win::ScopedBitmap bitmap(
::CreateDIBSection(hdc.Get(), reinterpret_cast<BITMAPINFO*>(&hdr), 0,
reinterpret_cast<void**>(&bits), NULL, 0));
- DCHECK(bitmap);
- base::win::ScopedSelectObject select_object(hdc.Get(), bitmap);
+ DCHECK(bitmap.is_valid());
+ base::win::ScopedSelectObject select_object(hdc.Get(), bitmap.get());
skia::InitializeDC(hdc.Get());
« no previous file with comments | « printing/emf_win.cc ('k') | remoting/host/desktop_shape_tracker_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698