From 796c908e7b7bdde819a1e5a4bfd3576d8e8859d6 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 16 Jul 2015 18:45:22 -0700 Subject: Merge to XFA: Cleanup: Do not check pointers before deleting them, part 2. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1195363002 . (cherry picked from commit 21bf242a31eff79f754c5e9c3b41c52e33483bb0) Review URL: https://codereview.chromium.org/1235753006 . --- fpdfsdk/src/pdfwindow/PWL_FontMap.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'fpdfsdk/src/pdfwindow') diff --git a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp index 943e4979b2..1f20d12aca 100644 --- a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp @@ -21,13 +21,10 @@ CPWL_FontMap::CPWL_FontMap(IFX_SystemHandler* pSystemHandler) : CPWL_FontMap::~CPWL_FontMap() { - if (m_pPDFDoc) - { - delete m_pPDFDoc; - m_pPDFDoc = NULL; - } + delete m_pPDFDoc; + m_pPDFDoc = NULL; - Empty(); + Empty(); } void CPWL_FontMap::SetSystemHandler(IFX_SystemHandler* pSystemHandler) -- cgit v1.2.3