summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/cpdf_annotlist.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/fpdfdoc/cpdf_annotlist.cpp b/core/fpdfdoc/cpdf_annotlist.cpp
index 0d9c613e91..940cf324f4 100644
--- a/core/fpdfdoc/cpdf_annotlist.cpp
+++ b/core/fpdfdoc/cpdf_annotlist.cpp
@@ -73,10 +73,7 @@ CPDF_AnnotList::CPDF_AnnotList(CPDF_Page* pPage)
uint32_t dwObjNum = pDict->GetObjNum();
if (dwObjNum == 0) {
- dwObjNum = m_pDocument->AddIndirectObject(pDict);
- CPDF_Reference* pAction = new CPDF_Reference(m_pDocument, dwObjNum);
- pAnnots->InsertAt(i, pAction);
- pAnnots->RemoveAt(i + 1);
+ pAnnots->ConvertToIndirectObjectAt(i, m_pDocument);
pDict = pAnnots->GetDictAt(i);
}