Index: Source/core/svg/SVGPatternElement.cpp |
diff --git a/Source/core/svg/SVGPatternElement.cpp b/Source/core/svg/SVGPatternElement.cpp |
index 9153a2f8fb72ad23776976676f8efb295c936bb8..fa6db5cd4f5a454a45bf7a25a58a142d39bb246e 100644 |
--- a/Source/core/svg/SVGPatternElement.cpp |
+++ b/Source/core/svg/SVGPatternElement.cpp |
@@ -192,8 +192,8 @@ void SVGPatternElement::collectPatternAttributes(PatternAttributes& attributes) |
// Respect xlink:href, take attributes from referenced element |
Node* refNode = SVGURIReference::targetElementFromIRIString(current->hrefString(), document()); |
- if (refNode && refNode->hasTagName(SVGNames::patternTag)) { |
- current = toSVGPatternElement(const_cast<const Node*>(refNode)); |
+ if (isSVGPatternElement(refNode)) { |
+ current = toSVGPatternElement(refNode); |
// Cycle detection |
if (processedPatterns.contains(current)) |