From 39fbb7e1c2282a46d9bd3adfd030916dcb0155ef Mon Sep 17 00:00:00 2001 From: thestig Date: Thu, 12 May 2016 15:35:00 -0700 Subject: Clean up CFX_ImageTransformer. Review-Url: https://codereview.chromium.org/1973913002 --- core/fpdfapi/fpdf_font/cpdf_type3font.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'core/fpdfapi/fpdf_font/cpdf_type3font.cpp') diff --git a/core/fpdfapi/fpdf_font/cpdf_type3font.cpp b/core/fpdfapi/fpdf_font/cpdf_type3font.cpp index be280948ae..6c339ea5a7 100644 --- a/core/fpdfapi/fpdf_font/cpdf_type3font.cpp +++ b/core/fpdfapi/fpdf_font/cpdf_type3font.cpp @@ -136,10 +136,8 @@ CPDF_Type3Char* CPDF_Type3Font::LoadChar(uint32_t charcode, int level) { ASSERT(!pdfium::ContainsKey(m_CacheMap, charcode)); CPDF_Type3Char* pCachedChar = pNewChar.release(); m_CacheMap[charcode] = pCachedChar; - if (pCachedChar->m_pForm->GetPageObjectList()->empty()) { - delete pCachedChar->m_pForm; - pCachedChar->m_pForm = nullptr; - } + if (pCachedChar->m_pForm->GetPageObjectList()->empty()) + pCachedChar->m_pForm.reset(); return pCachedChar; } -- cgit v1.2.3