summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffpageview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/cxfa_ffpageview.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffpageview.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/xfa/fxfa/cxfa_ffpageview.cpp b/xfa/fxfa/cxfa_ffpageview.cpp
index 3c88a121da..26bdc26acd 100644
--- a/xfa/fxfa/cxfa_ffpageview.cpp
+++ b/xfa/fxfa/cxfa_ffpageview.cpp
@@ -314,11 +314,10 @@ CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetTraverseWidget(
CXFA_Node* pTraverse =
pTraversal->GetChild(0, XFA_Element::Traverse, false);
if (pTraverse) {
- WideString wsTraverseWidgetName;
- if (pTraverse->JSNode()->GetAttribute(XFA_Attribute::Ref,
- wsTraverseWidgetName, true)) {
- return FindWidgetByName(wsTraverseWidgetName, pWidget);
- }
+ pdfium::Optional<WideString> traverseWidgetName =
+ pTraverse->JSNode()->TryAttribute(XFA_Attribute::Ref, true);
+ if (traverseWidgetName)
+ return FindWidgetByName(*traverseWidgetName, pWidget);
}
}
return nullptr;