Index: fpdfsdk/src/fpdf_flatten.cpp |
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp |
index 73410b6c39dc9dae6fb6efcab7febaef0cd3fe0e..9d5a0d40670cbd452e25fbc67cf7e5ff47536ce9 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; |