summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfeditimg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfeditimg.cpp')
-rw-r--r--fpdfsdk/fpdfeditimg.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/fpdfeditimg.cpp b/fpdfsdk/fpdfeditimg.cpp
index ca78088793..4738bd1325 100644
--- a/fpdfsdk/fpdfeditimg.cpp
+++ b/fpdfsdk/fpdfeditimg.cpp
@@ -48,9 +48,9 @@ FPDFPageObj_NewImageObj(FPDF_DOCUMENT document) {
if (!pDoc)
return nullptr;
- CPDF_ImageObject* pImageObj = new CPDF_ImageObject;
- pImageObj->SetOwnedImage(pdfium::MakeUnique<CPDF_Image>(pDoc));
- return pImageObj;
+ auto pImageObj = pdfium::MakeUnique<CPDF_ImageObject>();
+ pImageObj->SetImage(pdfium::MakeRetain<CPDF_Image>(pDoc));
+ return pImageObj.release();
}
DLLEXPORT FPDF_PAGEOBJECT STDCALL