Index: Source/core/svg/SVGElement.cpp |
diff --git a/Source/core/svg/SVGElement.cpp b/Source/core/svg/SVGElement.cpp |
index 79b8806764b2514ceb659a4dba76abcbae5f3c75..e0a312336479d0331318b43a746cbd414eca1f65 100644 |
--- a/Source/core/svg/SVGElement.cpp |
+++ b/Source/core/svg/SVGElement.cpp |
@@ -966,9 +966,6 @@ void SVGElement::markForLayoutAndParentResourceInvalidation(LayoutObject* render |
void SVGElement::invalidateInstances() |
{ |
- if (!inDocument()) |
- return; |
- |
if (instanceUpdatesBlocked()) |
return; |
@@ -981,14 +978,15 @@ void SVGElement::invalidateInstances() |
instance->setCorrespondingElement(0); |
if (SVGUseElement* element = instance->correspondingUseElement()) { |
- ASSERT(element->inDocument()); |
- element->invalidateShadowTree(); |
+ if (element->inDocument()) |
+ element->invalidateShadowTree(); |
} |
} |
svgRareData()->elementInstances().clear(); |
- document().updateRenderTreeIfNeeded(); |
+ if (inDocument()) |
+ document().updateRenderTreeIfNeeded(); |
} |
SVGElement::InstanceUpdateBlocker::InstanceUpdateBlocker(SVGElement* targetElement) |