Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Unified Diff: xfa/fxbarcode/pdf417/BC_PDF417.cpp

Issue 1925363002: Do not check pointers before deleting them. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxbarcode/oned/BC_OneDimWriter.cpp ('k') | xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/pdf417/BC_PDF417.cpp
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417.cpp b/xfa/fxbarcode/pdf417/BC_PDF417.cpp
index 15b448b37bf92edf1e7e3d59798eac437190c9fb..908901c04eb2020f9b918d3b00b602561c4cedde 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);
« no previous file with comments | « xfa/fxbarcode/oned/BC_OneDimWriter.cpp ('k') | xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698