diff options
Diffstat (limited to 'fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp')
-rw-r--r-- | fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp index e1f14aa9d4..b8549fce74 100644 --- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp +++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp @@ -477,17 +477,21 @@ void CPDFXFA_Document::PageViewEvent(IXFA_PageView* pPageView, return; } CPDFXFA_Page* pPage = nullptr; + CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); if (dwFlags == XFA_PAGEVIEWEVENT_PostAdded) { - pPage = GetPage(pPageView->GetPageViewIndex()); + int nPageIndex = pPageView->GetPageViewIndex(); + pPage = GetPage(nPageIndex); if (pPage) pPage->SetXFAPageView(pPageView); + pEnv->FFI_PageEvent(nPageIndex, dwFlags); return; } pPage = GetPage(pPageView); if (!pPage) return; - pPage->SetXFAPageView(nullptr); + pEnv->FFI_PageEvent(pPage->GetPageIndex(), dwFlags); m_pSDKDoc->GetPageView(pPage)->ClearFXAnnots(); + pPage->Release(); } void CPDFXFA_Document::WidgetEvent(IXFA_Widget* hWidget, |