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

Unified Diff: ui/views/controls/menu/menu_config_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: Use ScopedHICON instead of HICON. Created 5 years, 1 month 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
Index: ui/views/controls/menu/menu_config_win.cc
diff --git a/ui/views/controls/menu/menu_config_win.cc b/ui/views/controls/menu/menu_config_win.cc
index 3f17f58252796e48513fa6a508e05746cbc15e03..10f6bfadaafef209a7c84e8567cd83dd27da1fec 100644
--- a/ui/views/controls/menu/menu_config_win.cc
+++ b/ui/views/controls/menu/menu_config_win.cc
@@ -34,8 +34,8 @@ void MenuConfig::Init(const NativeTheme* theme) {
l10n_util::AdjustUIFont(&(metrics.lfMenuFont));
{
base::win::ScopedHFONT new_font(CreateFontIndirect(&metrics.lfMenuFont));
- DLOG_ASSERT(new_font.Get());
- font_list = gfx::FontList(gfx::Font(new_font));
+ DLOG_ASSERT(new_font.is_valid());
+ font_list = gfx::FontList(gfx::Font(new_font.get()));
}
NativeTheme::ExtraParams extra;
extra.menu_check.is_radio = false;

Powered by Google App Engine
This is Rietveld 408576698