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

Unified Diff: ui/gfx/font_render_params_win.cc

Issue 2963783002: Remove unsafe registry APIs from base::win::RegKey
Patch Set: half-fix remoting Created 3 years, 6 months 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
« chrome/common/chrome_paths.cc ('K') | « remoting/host/daemon_process_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/font_render_params_win.cc
diff --git a/ui/gfx/font_render_params_win.cc b/ui/gfx/font_render_params_win.cc
index 1f8ab84c8448d9e0cd8a75f665406f088ddbbbc7..f2ac9f43c28ce73754e3916e957bde9411bc5b82 100644
--- a/ui/gfx/font_render_params_win.cc
+++ b/ui/gfx/font_render_params_win.cc
@@ -31,8 +31,8 @@ FontRenderParams::SubpixelRendering GetSubpixelRenderingGeometry() {
(L"SOFTWARE\\Microsoft\\Avalon.Graphics\\" + trimmed.value()).c_str(),
KEY_READ);
DWORD pixel_structure;
- if (key.ReadValueDW(L"PixelStructure", &pixel_structure) ==
- ERROR_SUCCESS) {
+ if (key.Valid() && key.ReadValueDW(L"PixelStructure", &pixel_structure) ==
+ ERROR_SUCCESS) {
if (pixel_structure == 1)
return FontRenderParams::SUBPIXEL_RENDERING_RGB;
if (pixel_structure == 2)
« chrome/common/chrome_paths.cc ('K') | « remoting/host/daemon_process_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698