Index: fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h |
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h |
index 6d501317d6ed8b01837bcd3b058fe7c09f14e4dc..dc09c8b6566be832efb601befd598423c2123587 100644 |
--- a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h |
+++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h |
@@ -11,6 +11,7 @@ |
#include "public/fpdfview.h" |
#include "xfa/include/fxfa/fxfa.h" |
+#include "xfa/include/fxfa/xfa_ffdoc.h" |
#include "xfa/include/fxfa/xfa_ffdochandler.h" |
class CPDFXFA_App; |
@@ -212,12 +213,13 @@ class CPDFXFA_Document : public IXFA_DocProvider { |
FXFA_LOADSTATUS_CLOSING, |
FXFA_LOADSTATUS_CLOSED |
}; |
+ |
void CloseXFADoc(CXFA_FFDocHandler* pDoc) { |
if (pDoc) { |
- pDoc->CloseDoc(m_pXFADoc); |
- pDoc->ReleaseDoc(m_pXFADoc); |
- m_pXFADoc = NULL; |
- m_pXFADocView = NULL; |
+ m_pXFADoc->CloseDoc(); |
+ delete m_pXFADoc; |
+ m_pXFADoc = nullptr; |
+ m_pXFADocView = nullptr; |
} |
} |