summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-04-28 17:29:19 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-28 17:29:19 -0700
commit495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc (patch)
tree42abda300274f81009bdb9866e0f7e3f81164726 /xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp
parenta31098417852bdf13e693a6e0913e0706cf94098 (diff)
downloadpdfium-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_PDF417Detector.cpp')
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp b/xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp
index cfd52e56dc..345efd5648 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp
@@ -114,9 +114,7 @@ CFX_PtrArray* CBC_Detector::detect(FX_BOOL multiple,
CFX_PtrArray* vertices = findVertices(bitMatrix, row, column);
if (vertices->GetAt(0) == NULL && vertices->GetAt(3) == NULL) {
if (!foundBarcodeInRow) {
- if (vertices) {
- delete (vertices);
- }
+ delete vertices;
break;
}
foundBarcodeInRow = FALSE;
@@ -132,9 +130,7 @@ CFX_PtrArray* CBC_Detector::detect(FX_BOOL multiple,
}
}
row += ROW_STEP;
- if (vertices) {
- delete (vertices);
- }
+ delete vertices;
continue;
}
foundBarcodeInRow = TRUE;