Index: third_party/WebKit/Source/core/svg/SVGLengthContext.cpp |
diff --git a/third_party/WebKit/Source/core/svg/SVGLengthContext.cpp b/third_party/WebKit/Source/core/svg/SVGLengthContext.cpp |
index bd4cf089796b580dc03810a7fd2d4dcd88b938b4..a8d35f3e0110ee72e1112f3d8a39bc4e6f773837 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGLengthContext.cpp |
+++ b/third_party/WebKit/Source/core/svg/SVGLengthContext.cpp |
@@ -387,8 +387,11 @@ float SVGLengthContext::convertValueFromUserUnitsToCHS(float value) const { |
float SVGLengthContext::convertValueFromCHSToUserUnits(float value) const { |
const ComputedStyle* style = computedStyleForLengthResolving(m_context); |
+ if (!style) |
+ return 0; |
+ |
const SimpleFontData* fontData = style->font().primaryFont(); |
- if (!style || !fontData) |
+ if (!fontData) |
return 0; |
return value * fontData->getFontMetrics().zeroWidth() / |