Index: third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp |
diff --git a/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp b/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp |
index 4e39e7fb80f4d52fdcca3ce067860ca5b333f8d0..48e88cebce675312212b504c860fc2785fc537b9 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp |
+++ b/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp |
@@ -169,20 +169,16 @@ void SVGGraphicsElement::svgAttributeChanged(const QualifiedName& attrName) { |
} |
if (attrName == SVGNames::transformAttr) { |
- LayoutObject* object = layoutObject(); |
- if (!object) |
- return; |
- |
- invalidateSVGPresentationAttributeStyle(); |
- |
SVGElement::InvalidationGuard invalidationGuard(this); |
+ invalidateSVGPresentationAttributeStyle(); |
// TODO(fs): The InvalidationGuard will make sure all instances are |
// invalidated, but the style recalc will propagate to instances too. So |
// there is some redundant operations being performed here. Could we get |
// away with removing the InvalidationGuard? |
setNeedsStyleRecalc(LocalStyleChange, |
StyleChangeReasonForTracing::fromAttribute(attrName)); |
- markForLayoutAndParentResourceInvalidation(object); |
+ if (LayoutObject* object = layoutObject()) |
+ markForLayoutAndParentResourceInvalidation(object); |
return; |
} |