summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_node_statics.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/cxfa_node_statics.cpp b/xfa/fxfa/parser/cxfa_node_statics.cpp
index d0e65c8f62..a33b320216 100644
--- a/xfa/fxfa/parser/cxfa_node_statics.cpp
+++ b/xfa/fxfa/parser/cxfa_node_statics.cpp
@@ -650,7 +650,7 @@ XFA_Element CXFA_Node::NameToElement(const WideString& name) {
auto* elem = std::lower_bound(
std::begin(ElementNameToEnum), std::end(ElementNameToEnum), hash,
[](const ElementNameInfo& a, uint32_t hash) { return a.hash < hash; });
- if (elem && elem->hash == hash)
+ if (elem != std::end(ElementNameToEnum) && elem->hash == hash)
return elem->element;
return XFA_Element::Unknown;
}