diff options
author | thestig <thestig@chromium.org> | 2016-04-28 17:29:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-28 17:29:19 -0700 |
commit | 495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc (patch) | |
tree | 42abda300274f81009bdb9866e0f7e3f81164726 /xfa/fxbarcode/pdf417/BC_PDF417.cpp | |
parent | a31098417852bdf13e693a6e0913e0706cf94098 (diff) | |
download | pdfium-495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc.tar.xz |
Do not check pointers before deleting them.
XFA edition.
Review-Url: https://codereview.chromium.org/1925363002
Diffstat (limited to 'xfa/fxbarcode/pdf417/BC_PDF417.cpp')
-rw-r--r-- | xfa/fxbarcode/pdf417/BC_PDF417.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417.cpp b/xfa/fxbarcode/pdf417/BC_PDF417.cpp index 15b448b37b..908901c04e 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417.cpp +++ b/xfa/fxbarcode/pdf417/BC_PDF417.cpp @@ -401,11 +401,11 @@ CBC_PDF417::CBC_PDF417(FX_BOOL compact) { m_minRows = 3; m_barcodeMatrix = NULL; } + CBC_PDF417::~CBC_PDF417() { - if (m_barcodeMatrix) { - delete m_barcodeMatrix; - } + delete m_barcodeMatrix; } + CBC_BarcodeMatrix* CBC_PDF417::getBarcodeMatrix() { return m_barcodeMatrix; } @@ -556,9 +556,7 @@ CFX_Int32Array* CBC_PDF417::determineDimensions( continue; } ratio = newRatio; - if (dimension) { - delete dimension; - } + delete dimension; dimension = new CFX_Int32Array; dimension->Add(cols); dimension->Add(rows); |