Index: ui/gfx/display.cc |
diff --git a/ui/gfx/display.cc b/ui/gfx/display.cc |
index 03949cb315c7f34e38d90e7905c22ad96c58eba8..7b77ae40eac7e72f1a6eb4a16b14bc6ee36cf6e7 100644 |
--- a/ui/gfx/display.cc |
+++ b/ui/gfx/display.cc |
@@ -40,8 +40,10 @@ float GetForcedDeviceScaleFactorImpl() { |
std::string value = |
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
switches::kForceDeviceScaleFactor); |
- if (!base::StringToDouble(value, &scale_in_double)) |
+ if (!base::StringToDouble(value, &scale_in_double)) { |
LOG(ERROR) << "Failed to parse the default device scale factor:" << value; |
+ scale_in_double = 1.0; |
+ } |
} |
return static_cast<float>(scale_in_double); |
} |