summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_flatten.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fpdf_flatten.cpp')
-rw-r--r--fpdfsdk/src/fpdf_flatten.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp
index 73410b6c39..9d5a0d4067 100644
--- a/fpdfsdk/src/fpdf_flatten.cpp
+++ b/fpdfsdk/src/fpdf_flatten.cpp
@@ -312,14 +312,11 @@ void GetOffset(FX_FLOAT& fa,
}
DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!page) {
return FLATTEN_FAIL;
}
- CPDF_Page* pPage = ((CPDFXFA_Page*)(page))->GetPDFPage();
- if (!pPage)
- return FLATTEN_FAIL;
-
CPDF_Document* pDocument = pPage->m_pDocument;
CPDF_Dictionary* pPageDict = pPage->m_pFormDict;