Index: core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp |
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp |
index ef0344cda0352fb2f23a4c49e7645311724df3d7..77c58f09255da975079c27f342564dc365cb2cac 100644 |
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp |
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp |
@@ -31,10 +31,10 @@ void CPDF_PageContentGenerator::GenerateContent() { |
CPDF_Dictionary* pPageDict = m_pPage->m_pFormDict; |
for (int i = 0; i < m_pageObjects.GetSize(); ++i) { |
CPDF_PageObject* pPageObj = m_pageObjects[i]; |
- if (!pPageObj || pPageObj->m_Type != CPDF_PageObject::IMAGE) { |
+ if (!pPageObj || !pPageObj->IsImage()) { |
continue; |
} |
- ProcessImage(buf, (CPDF_ImageObject*)pPageObj); |
+ ProcessImage(buf, pPageObj->AsImage()); |
} |
CPDF_Object* pContent = |
pPageDict ? pPageDict->GetElementValue("Contents") : NULL; |