Index: ui/gfx/platform_font_win.cc |
diff --git a/ui/gfx/platform_font_win.cc b/ui/gfx/platform_font_win.cc |
index d271f01fb585d90c1e224781e551aaaee90ed1db..57606b86c014291cc4d9c05569ceeb0d253a476a 100644 |
--- a/ui/gfx/platform_font_win.cc |
+++ b/ui/gfx/platform_font_win.cc |
@@ -130,7 +130,7 @@ HRESULT FindDirectWriteFontForLOGFONT(IDWriteFactory* factory, |
// If this succeeds we return the matched font. |
base::win::ScopedGDIObject<HFONT> font(::CreateFontIndirect(font_info)); |
base::win::ScopedGetDC screen_dc(NULL); |
- base::win::ScopedSelectObject scoped_font(screen_dc, font); |
+ base::win::ScopedSelectObject scoped_font(screen_dc, font.get()); |
base::win::ScopedComPtr<IDWriteFontFace> font_face; |
hr = gdi_interop->CreateFontFaceFromHdc(screen_dc, font_face.Receive()); |
@@ -453,7 +453,7 @@ int PlatformFontWin::GetFontSize(const LOGFONT& font_info) { |
base::win::ScopedGDIObject<HFONT> font(CreateFontIndirect(&font_info)); |
TEXTMETRIC font_metrics = {0}; |
- PlatformFontWin::GetTextMetricsForFont(screen_dc, font, &font_metrics); |
+ PlatformFontWin::GetTextMetricsForFont(screen_dc, font.get(), &font_metrics); |
return font_metrics.tmAscent; |
} |