summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xfa/fxfa/parser/cxfa_document.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp
index c3e73e2f19..6860c83376 100644
--- a/xfa/fxfa/parser/cxfa_document.cpp
+++ b/xfa/fxfa/parser/cxfa_document.cpp
@@ -1511,12 +1511,13 @@ void CXFA_Document::DoProtoMerge() {
}
for (CXFA_Node* pUseHrefNode : sUseNodes) {
+ // Must outlive the WideStringViews below.
+ WideString wsUseVal =
+ pUseHrefNode->JSObject()->GetCData(XFA_Attribute::Usehref);
WideStringView wsURI;
WideStringView wsID;
WideStringView wsSOM;
- WideString wsUseVal =
- pUseHrefNode->JSObject()->GetCData(XFA_Attribute::Usehref);
if (!wsUseVal.IsEmpty()) {
auto uSharpPos = wsUseVal.Find('#');
if (!uSharpPos.has_value()) {