summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/BC_TwoDimWriter.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/BC_TwoDimWriter.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/BC_TwoDimWriter.cpp')
-rw-r--r--xfa/fxbarcode/BC_TwoDimWriter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxbarcode/BC_TwoDimWriter.cpp b/xfa/fxbarcode/BC_TwoDimWriter.cpp
index f0065a02b9..a844bf1c42 100644
--- a/xfa/fxbarcode/BC_TwoDimWriter.cpp
+++ b/xfa/fxbarcode/BC_TwoDimWriter.cpp
@@ -53,6 +53,7 @@ void CBC_TwoDimWriter::RenderDeviceResult(CFX_RenderDevice* device,
}
}
}
+
void CBC_TwoDimWriter::RenderBitmapResult(CFX_DIBitmap*& pOutBitmap,
int32_t& e) {
if (m_bFixedSize) {
@@ -80,12 +81,11 @@ void CBC_TwoDimWriter::RenderBitmapResult(CFX_DIBitmap*& pOutBitmap,
}
if (!m_bFixedSize) {
CFX_DIBitmap* pStretchBitmap = pOutBitmap->StretchTo(m_Width, m_Height);
- if (pOutBitmap) {
- delete pOutBitmap;
- }
+ delete pOutBitmap;
pOutBitmap = pStretchBitmap;
}
}
+
void CBC_TwoDimWriter::RenderResult(uint8_t* code,
int32_t codeWidth,
int32_t codeHeight,