summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_rendercontext.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-06-19 17:26:17 -0700
committerLei Zhang <thestig@chromium.org>2015-06-19 17:26:17 -0700
commit6d8b1c2c7b1cbada20109f70ae971a4192330bb5 (patch)
treee755b7cb2624622cba606134493d25fb7f1ce6c8 /fpdfsdk/src/fsdk_rendercontext.cpp
parent9883a7da2d4f31910073c03e703d5b97a45d9254 (diff)
downloadpdfium-6d8b1c2c7b1cbada20109f70ae971a4192330bb5.tar.xz
Merge to XFA: Cleanup: Do not check pointers before deleting them.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1192743004. (cherry picked from commit cfac954abcab7caf47d3fa3d641c553cba998271) Review URL: https://codereview.chromium.org/1196783003.
Diffstat (limited to 'fpdfsdk/src/fsdk_rendercontext.cpp')
-rw-r--r--fpdfsdk/src/fsdk_rendercontext.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/fpdfsdk/src/fsdk_rendercontext.cpp b/fpdfsdk/src/fsdk_rendercontext.cpp
index 70c4a17248..4b7242d2b9 100644
--- a/fpdfsdk/src/fsdk_rendercontext.cpp
+++ b/fpdfsdk/src/fsdk_rendercontext.cpp
@@ -21,15 +21,15 @@ void CRenderContext::Clear()
CRenderContext::~CRenderContext()
{
- if (m_pRenderer) delete m_pRenderer;
- if (m_pContext) delete m_pContext;
- if (m_pDevice) delete m_pDevice;
- if (m_pAnnots) delete m_pAnnots;
- if (m_pOptions->m_pOCContext) delete m_pOptions->m_pOCContext;
- if (m_pOptions) delete m_pOptions;
+ delete m_pRenderer;
+ delete m_pContext;
+ delete m_pDevice;
+ delete m_pAnnots;
+ delete m_pOptions->m_pOCContext;
+ delete m_pOptions;
#ifdef _WIN32_WCE
- if (m_pBitmap) delete m_pBitmap;
- if (m_hBitmap) DeleteObject(m_hBitmap);
+ delete m_pBitmap;
+ if (m_hBitmap) DeleteObject(m_hBitmap);
#endif
}