summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfppo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfppo.cpp')
-rw-r--r--fpdfsdk/fpdfppo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp
index f8b96de1f3..786bc46611 100644
--- a/fpdfsdk/fpdfppo.cpp
+++ b/fpdfsdk/fpdfppo.cpp
@@ -285,12 +285,12 @@ uint32_t CPDF_PageOrganizer::GetNewObjId(CPDF_Document* pDoc,
return 0;
}
}
- dwNewObjNum = pDoc->AddIndirectObject(pClone.get());
+ CPDF_Object* pUnownedClone = pClone.get();
+ dwNewObjNum = pDoc->AddIndirectObject(pClone.release());
(*pObjNumberMap)[dwObjnum] = dwNewObjNum;
- if (!UpdateReference(pClone.get(), pDoc, pObjNumberMap))
+ if (!UpdateReference(pUnownedClone, pDoc, pObjNumberMap))
return 0;
- pClone.release(); // TODO(tsepez): figure out ownership.
return dwNewObjNum;
}