summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxbarcode')
-rw-r--r--xfa/fxbarcode/BC_TwoDimWriter.cpp5
-rw-r--r--xfa/fxbarcode/oned/BC_OneDimWriter.cpp5
2 files changed, 6 insertions, 4 deletions
diff --git a/xfa/fxbarcode/BC_TwoDimWriter.cpp b/xfa/fxbarcode/BC_TwoDimWriter.cpp
index 83b7b3c081..ec6c3626b2 100644
--- a/xfa/fxbarcode/BC_TwoDimWriter.cpp
+++ b/xfa/fxbarcode/BC_TwoDimWriter.cpp
@@ -82,9 +82,10 @@ void CBC_TwoDimWriter::RenderBitmapResult(CFX_DIBitmap*& pOutBitmap,
}
}
if (!m_bFixedSize) {
- CFX_DIBitmap* pStretchBitmap = pOutBitmap->StretchTo(m_Width, m_Height);
+ std::unique_ptr<CFX_DIBitmap> pStretchBitmap =
+ pOutBitmap->StretchTo(m_Width, m_Height);
delete pOutBitmap;
- pOutBitmap = pStretchBitmap;
+ pOutBitmap = pStretchBitmap.release();
}
}
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
index 0555ba65fd..09f7aea9db 100644
--- a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -343,9 +343,10 @@ void CBC_OneDimWriter::RenderBitmapResult(CFX_DIBitmap*& pOutBitmap,
e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
}
- CFX_DIBitmap* pStretchBitmap = pOutBitmap->StretchTo(m_Width, m_Height);
+ std::unique_ptr<CFX_DIBitmap> pStretchBitmap =
+ pOutBitmap->StretchTo(m_Width, m_Height);
delete pOutBitmap;
- pOutBitmap = pStretchBitmap;
+ pOutBitmap = pStretchBitmap.release();
}
void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device,