diff options
Diffstat (limited to 'core/src/fpdfdoc')
-rw-r--r-- | core/src/fpdfdoc/doc_vt.cpp | 6 | ||||
-rw-r--r-- | core/src/fpdfdoc/pdf_vt.h | 12 |
2 files changed, 5 insertions, 13 deletions
diff --git a/core/src/fpdfdoc/doc_vt.cpp b/core/src/fpdfdoc/doc_vt.cpp index bd23670b9a..c9f5673a60 100644 --- a/core/src/fpdfdoc/doc_vt.cpp +++ b/core/src/fpdfdoc/doc_vt.cpp @@ -823,10 +823,8 @@ CPDF_VariableText::CPDF_VariableText() : } CPDF_VariableText::~CPDF_VariableText() { - if (m_pVTIterator) { - delete m_pVTIterator; - m_pVTIterator = NULL; - } + delete m_pVTIterator; + m_pVTIterator = NULL; ResetAll(); } void CPDF_VariableText::Initialize() diff --git a/core/src/fpdfdoc/pdf_vt.h b/core/src/fpdfdoc/pdf_vt.h index 1c372a6026..baf3625f0d 100644 --- a/core/src/fpdfdoc/pdf_vt.h +++ b/core/src/fpdfdoc/pdf_vt.h @@ -84,12 +84,8 @@ struct CPVT_SectionInfo { } virtual ~CPVT_SectionInfo() { - if (pSecProps) { - delete pSecProps; - } - if (pWordProps) { - delete pWordProps; - } + delete pSecProps; + delete pWordProps; } CPVT_SectionInfo(const CPVT_SectionInfo & other): rcSection(), nTotalLine(0), pSecProps(NULL), pWordProps(NULL) { @@ -148,9 +144,7 @@ struct CPVT_WordInfo { } virtual ~CPVT_WordInfo() { - if (pWordProps) { - delete pWordProps; - } + delete pWordProps; } CPVT_WordInfo(const CPVT_WordInfo & word): Word(0), nCharset(0), fWordX(0.0f), fWordY(0.0f), fWordTail(0.0f), nFontIndex(-1), pWordProps(NULL) |