Index: fpdfsdk/fpdfppo.cpp |
diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp |
index f8b96de1f379ad00c5e277d0e589f2a8ff687c5f..786bc466115ac97a5da50e66e9da860d69a36ff9 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; |
} |