Index: fpdfsdk/fpdfeditimg.cpp |
diff --git a/fpdfsdk/fpdfeditimg.cpp b/fpdfsdk/fpdfeditimg.cpp |
index cd283019770dde11f2c71674824435e513a219d8..da3d33eb05f47773878afd2d5197440969ee1ac8 100644 |
--- a/fpdfsdk/fpdfeditimg.cpp |
+++ b/fpdfsdk/fpdfeditimg.cpp |
@@ -19,7 +19,7 @@ FPDFPageObj_NewImgeObj(FPDF_DOCUMENT document) { |
return nullptr; |
CPDF_ImageObject* pImageObj = new CPDF_ImageObject; |
- pImageObj->m_pImage = new CPDF_Image(pDoc); |
+ pImageObj->SetOwnedImage(WrapUnique(new CPDF_Image(pDoc))); |
return pImageObj; |
} |