From 495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc Mon Sep 17 00:00:00 2001 From: thestig Date: Thu, 28 Apr 2016 17:29:19 -0700 Subject: Do not check pointers before deleting them. XFA edition. Review-Url: https://codereview.chromium.org/1925363002 --- xfa/fxbarcode/BC_TwoDimWriter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xfa/fxbarcode/BC_TwoDimWriter.cpp') 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, -- cgit v1.2.3