summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_variabletext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpdf_variabletext.cpp')
-rw-r--r--core/fpdfdoc/cpdf_variabletext.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/fpdfdoc/cpdf_variabletext.cpp b/core/fpdfdoc/cpdf_variabletext.cpp
index 427cd5d306..3c71ed8786 100644
--- a/core/fpdfdoc/cpdf_variabletext.cpp
+++ b/core/fpdfdoc/cpdf_variabletext.cpp
@@ -256,11 +256,9 @@ CPDF_VariableText::CPDF_VariableText()
m_fFontSize(0.0f),
m_bInitial(FALSE),
m_bRichText(FALSE),
- m_pVTProvider(nullptr),
- m_pVTIterator(nullptr) {}
+ m_pVTProvider(nullptr) {}
CPDF_VariableText::~CPDF_VariableText() {
- delete m_pVTIterator;
ResetAll();
}
@@ -1149,8 +1147,8 @@ FX_BOOL CPDF_VariableText::IsLatinWord(uint16_t word) {
CPDF_VariableText::Iterator* CPDF_VariableText::GetIterator() {
if (!m_pVTIterator)
- m_pVTIterator = new CPDF_VariableText::Iterator(this);
- return m_pVTIterator;
+ m_pVTIterator.reset(new CPDF_VariableText::Iterator(this));
+ return m_pVTIterator.get();
}
void CPDF_VariableText::SetProvider(CPDF_VariableText::Provider* pProvider) {