summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_annot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/cpdfsdk_annot.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_annot.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/cpdfsdk_annot.cpp b/fpdfsdk/cpdfsdk_annot.cpp
index 6c17628a33..cfd87b3255 100644
--- a/fpdfsdk/cpdfsdk_annot.cpp
+++ b/fpdfsdk/cpdfsdk_annot.cpp
@@ -75,10 +75,11 @@ CFX_FloatRect CPDFSDK_Annot::GetRect() const {
IPDF_Page* CPDFSDK_Annot::GetPage() {
#ifdef PDF_ENABLE_XFA
- return GetPDFXFAPage();
-#else // PDF_ENABLE_XFA
- return GetPDFPage();
+ CPDFXFA_Page* pXFAPage = GetPDFXFAPage();
+ if (pXFAPage)
+ return pXFAPage;
#endif // PDF_ENABLE_XFA
+ return GetPDFPage();
}
CPDF_Page* CPDFSDK_Annot::GetPDFPage() {