Index: core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp |
diff --git a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp |
index 94795fd60e284b09109ef5f37f8ce7c2a80227a0..58b69257addc8628cef46f8aa600f2cadf3b779b 100644 |
--- a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp |
+++ b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp |
@@ -176,7 +176,7 @@ FX_BOOL CPDF_DataAvail::IsObjectsAvail( |
} else if (!pdfium::ContainsKey(m_ObjectSet, dwNum)) { |
m_ObjectSet.insert(dwNum); |
CPDF_Object* pReferred = |
- m_pDocument->GetIndirectObject(pRef->GetRefObjNum()); |
+ m_pDocument->GetOrParseIndirectObject(pRef->GetRefObjNum()); |
if (pReferred) |
new_obj_array.Add(pReferred); |
} |
@@ -1788,8 +1788,10 @@ CPDF_Dictionary* CPDF_DataAvail::GetPage(int index) { |
if (!pPageDict) |
return nullptr; |
- if (!m_pDocument->InsertIndirectObject(dwObjNum, pPageDict)) |
+ if (!m_pDocument->ReplaceIndirectObjectIfHigherGeneration(dwObjNum, |
+ pPageDict)) { |
return nullptr; |
+ } |
return pPageDict->GetDict(); |
} |
} |