Index: core/fpdfapi/fpdf_parser/cpdf_document.cpp |
diff --git a/core/fpdfapi/fpdf_parser/cpdf_document.cpp b/core/fpdfapi/fpdf_parser/cpdf_document.cpp |
index d3909ceaec2ee579f6fd9036baf4c0eaa6316c34..916d491ef1b76429bf586ba2b2af22d75b6dc980 100644 |
--- a/core/fpdfapi/fpdf_parser/cpdf_document.cpp |
+++ b/core/fpdfapi/fpdf_parser/cpdf_document.cpp |
@@ -302,7 +302,7 @@ int InsertNewPage(CPDF_Document* pDoc, |
pPagesList = new CPDF_Array; |
pPages->SetFor("Kids", pPagesList); |
} |
- pPagesList->Add(pPageDict, pDoc); |
+ pPagesList->Add(new CPDF_Reference(pDoc, pPageDict->GetObjNum())); |
pPages->SetIntegerFor("Count", nPages + 1); |
pPageDict->SetReferenceFor("Parent", pDoc, pPages->GetObjNum()); |
} else { |