diff options
author | Lei Zhang <thestig@chromium.org> | 2015-06-19 17:26:17 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-06-19 17:26:17 -0700 |
commit | 6d8b1c2c7b1cbada20109f70ae971a4192330bb5 (patch) | |
tree | e755b7cb2624622cba606134493d25fb7f1ce6c8 /core/src/fpdfdoc/pdf_vt.h | |
parent | 9883a7da2d4f31910073c03e703d5b97a45d9254 (diff) | |
download | pdfium-6d8b1c2c7b1cbada20109f70ae971a4192330bb5.tar.xz |
Merge to XFA: Cleanup: Do not check pointers before deleting them.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1192743004.
(cherry picked from commit cfac954abcab7caf47d3fa3d641c553cba998271)
Review URL: https://codereview.chromium.org/1196783003.
Diffstat (limited to 'core/src/fpdfdoc/pdf_vt.h')
-rw-r--r-- | core/src/fpdfdoc/pdf_vt.h | 12 |
1 files changed, 3 insertions, 9 deletions
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) |