Index: fpdfsdk/src/fpdfeditimg.cpp |
diff --git a/fpdfsdk/src/fpdfeditimg.cpp b/fpdfsdk/src/fpdfeditimg.cpp |
index 09295aa3c45293646cb55116a32559b197069cfd..cd4618e44dae2e0395eb008f997bf2dfeef60b16 100644 |
--- a/fpdfsdk/src/fpdfeditimg.cpp |
+++ b/fpdfsdk/src/fpdfeditimg.cpp |
@@ -32,7 +32,7 @@ FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages, |
CPDF_ImageObject* pImgObj = (CPDF_ImageObject*)image_object; |
pImgObj->m_GeneralState.GetModify(); |
for (int index = 0; index < nCount; index++) { |
- CPDF_Page* pPage = ((CPDFXFA_Page*)pages[index])->GetPDFPage(); |
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(pages[index]); |
if (!pPage) |
continue; |
pImgObj->m_pImage->ResetCache(pPage, NULL); |
@@ -73,7 +73,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages, |
CPDF_ImageObject* pImgObj = (CPDF_ImageObject*)image_object; |
pImgObj->m_GeneralState.GetModify(); |
for (int index = 0; index < nCount; index++) { |
- CPDF_Page* pPage = ((CPDFXFA_Page*)pages[index])->GetPDFPage(); |
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(pages[index]); |
if (!pPage) |
continue; |
pImgObj->m_pImage->ResetCache(pPage, NULL); |