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

Unified Diff: xfa/fxfa/app/xfa_ffwidget.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/fxfa/app/xfa_ffpushbutton.cpp ('k') | xfa/fxfa/app/xfa_textlayout.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_ffwidget.cpp
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp
index 34b29c79d298468f67543806bb60cd2a776c4d74..c1af34c030fc2556d6b597934f90c9e69dea5e50 100644
--- a/xfa/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/fxfa/app/xfa_ffwidget.cpp
@@ -526,17 +526,14 @@ CXFA_ImageRenderer::CXFA_ImageRenderer() {
m_Result = TRUE;
m_bPrint = FALSE;
}
+
CXFA_ImageRenderer::~CXFA_ImageRenderer() {
- if (m_pCloneConvert) {
- delete m_pCloneConvert;
- }
- if (m_pTransformer) {
- delete m_pTransformer;
- }
- if (m_DeviceHandle) {
+ delete m_pCloneConvert;
+ delete m_pTransformer;
+ if (m_DeviceHandle)
m_pDevice->CancelDIBits(m_DeviceHandle);
- }
}
+
FX_BOOL CXFA_ImageRenderer::Start(CFX_RenderDevice* pDevice,
CFX_DIBSource* pDIBSource,
FX_ARGB bitmap_argb,
« no previous file with comments | « xfa/fxfa/app/xfa_ffpushbutton.cpp ('k') | xfa/fxfa/app/xfa_textlayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698