diff options
Diffstat (limited to 'xfa/fxfa/cxfa_ffdocview.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffdocview.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp index 00f759a7f5..bcf5ef2772 100644 --- a/xfa/fxfa/cxfa_ffdocview.cpp +++ b/xfa/fxfa/cxfa_ffdocview.cpp @@ -306,10 +306,12 @@ CXFA_FFWidgetHandler* CXFA_FFDocView::GetWidgetHandler() { return m_pWidgetHandler.get(); } -CXFA_WidgetAccIterator* CXFA_FFDocView::CreateWidgetAccIterator( - XFA_WIDGETORDER eOrder) { +std::unique_ptr<CXFA_WidgetAccIterator> +CXFA_FFDocView::CreateWidgetAccIterator() { CXFA_Node* pFormRoot = GetRootSubform(); - return pFormRoot ? new CXFA_WidgetAccIterator(pFormRoot) : nullptr; + if (!pFormRoot) + return nullptr; + return pdfium::MakeUnique<CXFA_WidgetAccIterator>(pFormRoot); } CXFA_FFWidget* CXFA_FFDocView::GetFocusWidget() { |