summaryrefslogtreecommitdiff
path: root/fpdfsdk/fsdk_mgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fsdk_mgr.cpp')
-rw-r--r--fpdfsdk/fsdk_mgr.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp
index 4ab4850c4d..2d641783f9 100644
--- a/fpdfsdk/fsdk_mgr.cpp
+++ b/fpdfsdk/fsdk_mgr.cpp
@@ -905,10 +905,11 @@ void CPDFSDK_PageView::LoadFXAnnots() {
m_page->AddRef();
if (m_pSDKDoc->GetXFADocument()->GetDocType() == DOCTYPE_DYNAMIC_XFA) {
CXFA_FFPageView* pageView = m_page->GetXFAPageView();
- IXFA_WidgetIterator* pWidgetHander = pageView->CreateWidgetIterator(
- XFA_TRAVERSEWAY_Form, XFA_WIDGETFILTER_Visible |
- XFA_WIDGETFILTER_Viewable |
- XFA_WIDGETFILTER_AllType);
+ std::unique_ptr<IXFA_WidgetIterator> pWidgetHander(
+ pageView->CreateWidgetIterator(XFA_TRAVERSEWAY_Form,
+ XFA_WIDGETFILTER_Visible |
+ XFA_WIDGETFILTER_Viewable |
+ XFA_WIDGETFILTER_AllType));
if (!pWidgetHander) {
m_page->Release();
SetLock(FALSE);
@@ -919,11 +920,9 @@ void CPDFSDK_PageView::LoadFXAnnots() {
CPDFSDK_Annot* pAnnot = pAnnotHandlerMgr->NewAnnot(pXFAAnnot, this);
if (!pAnnot)
continue;
-
m_fxAnnotArray.push_back(pAnnot);
pAnnotHandlerMgr->Annot_OnLoad(pAnnot);
}
- pWidgetHander->Release();
} else {
CPDF_Page* pPage = m_page->GetPDFPage();
ASSERT(pPage);