From 6d8b1c2c7b1cbada20109f70ae971a4192330bb5 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 19 Jun 2015 17:26:17 -0700 Subject: 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. --- fpdfsdk/src/fsdk_mgr.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'fpdfsdk/src/fsdk_mgr.cpp') diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp index 69a9929bc3..0f71e6eaa0 100644 --- a/fpdfsdk/src/fsdk_mgr.cpp +++ b/fpdfsdk/src/fsdk_mgr.cpp @@ -230,7 +230,6 @@ CPDFDoc_Environment::CPDFDoc_Environment(CPDFXFA_Document* pDoc) : CPDFDoc_Environment::~CPDFDoc_Environment() { - delete m_pIFormFiller; m_pIFormFiller = NULL; @@ -634,11 +633,9 @@ CPDFSDK_PageView::~CPDFSDK_PageView() pAnnotHandlerMgr->ReleaseAnnot(pAnnot); } m_fxAnnotArray.RemoveAll(); - if(m_pAnnotList) - { - delete m_pAnnotList; - m_pAnnotList = NULL; - } + + delete m_pAnnotList; + m_pAnnotList = NULL; } void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,CPDF_RenderOptions* pOptions, FX_RECT* pClip) -- cgit v1.2.3