summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/cpdf_metadata.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp
index 323de4ffcf..5ef7312752 100644
--- a/core/fpdfdoc/cpdf_metadata.cpp
+++ b/core/fpdfdoc/cpdf_metadata.cpp
@@ -49,11 +49,9 @@ void CheckForSharedFormInternal(CFX_XMLElement* element,
for (auto* child = element->GetFirstChild(); child;
child = child->GetNextSibling()) {
- if (child->GetType() != FX_XMLNODE_Element)
- continue;
-
- CheckForSharedFormInternal(static_cast<CFX_XMLElement*>(child),
- unsupported);
+ CFX_XMLElement* pElement = ToXMLElement(child);
+ if (pElement)
+ CheckForSharedFormInternal(pElement, unsupported);
}
}