Index: core/fpdfapi/fpdf_page/cpdf_formobject.cpp |
diff --git a/core/fpdfapi/fpdf_page/cpdf_formobject.cpp b/core/fpdfapi/fpdf_page/cpdf_formobject.cpp |
index 567c156af0af3bac076518bd4c9dcfd4a2b7aa79..dc93ed3c54844be2634b63107fc6ab6ae93b7929 100644 |
--- a/core/fpdfapi/fpdf_page/cpdf_formobject.cpp |
+++ b/core/fpdfapi/fpdf_page/cpdf_formobject.cpp |
@@ -8,11 +8,9 @@ |
#include "core/fpdfapi/fpdf_page/include/cpdf_form.h" |
-CPDF_FormObject::CPDF_FormObject() : m_pForm(nullptr) {} |
+CPDF_FormObject::CPDF_FormObject() {} |
-CPDF_FormObject::~CPDF_FormObject() { |
- delete m_pForm; |
-} |
+CPDF_FormObject::~CPDF_FormObject() {} |
void CPDF_FormObject::Transform(const CFX_Matrix& matrix) { |
m_FormMatrix.Concat(matrix); |
@@ -35,7 +33,7 @@ CPDF_FormObject* CPDF_FormObject::Clone() const { |
CPDF_FormObject* obj = new CPDF_FormObject; |
obj->CopyData(this); |
- obj->m_pForm = m_pForm->Clone(); |
+ obj->m_pForm.reset(m_pForm->Clone()); |
obj->m_FormMatrix = m_FormMatrix; |
return obj; |
} |