summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/oned/BC_OneDimWriter.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/oned/BC_OneDimWriter.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/oned/BC_OneDimWriter.cpp')
-rw-r--r--xfa/fxbarcode/oned/BC_OneDimWriter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
index b95c2be283..ae1b237957 100644
--- a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -290,6 +290,7 @@ void CBC_OneDimWriter::ShowChars(const CFX_WideStringC& contents,
}
FX_Free(pCharPos);
}
+
void CBC_OneDimWriter::RenderBitmapResult(CFX_DIBitmap*& pOutBitmap,
const CFX_WideStringC& contents,
int32_t& e) {
@@ -319,11 +320,10 @@ void CBC_OneDimWriter::RenderBitmapResult(CFX_DIBitmap*& pOutBitmap,
BC_EXCEPTION_CHECK_ReturnVoid(e);
}
CFX_DIBitmap* pStretchBitmap = pOutBitmap->StretchTo(m_Width, m_Height);
- if (pOutBitmap) {
- delete pOutBitmap;
- }
+ delete pOutBitmap;
pOutBitmap = pStretchBitmap;
}
+
void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device,
const CFX_Matrix* matrix,
const CFX_WideStringC& contents,