summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp
index b3f1302eae..55a85fd6d9 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp
@@ -412,13 +412,14 @@ bool XFA_FDEExtension_ResolveNamespaceQualifier(
} else {
wsNSAttribute = L"xmlns:" + wsQualifier;
}
- for (; pNode != pFakeRoot; pNode = static_cast<CFDE_XMLElement*>(
- pNode->GetNodeItem(CFDE_XMLNode::Parent))) {
- if (pNode->GetType() != FDE_XMLNODE_Element)
+ for (CFDE_XMLNode* pParent = pNode; pParent != pFakeRoot;
+ pParent = pParent->GetNodeItem(CFDE_XMLNode::Parent)) {
+ if (pParent->GetType() != FDE_XMLNODE_Element)
continue;
- if (pNode->HasAttribute(wsNSAttribute.c_str())) {
- *wsNamespaceURI = pNode->GetString(wsNSAttribute.c_str());
+ auto* pElement = static_cast<CFDE_XMLElement*>(pParent);
+ if (pElement->HasAttribute(wsNSAttribute.c_str())) {
+ *wsNamespaceURI = pElement->GetString(wsNSAttribute.c_str());
return true;
}
}