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. --- core/src/fxge/ge/fx_ge_font.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'core/src/fxge/ge/fx_ge_font.cpp') diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp index c9e3e3fe1f..d04f4fd59d 100644 --- a/core/src/fxge/ge/fx_ge_font.cpp +++ b/core/src/fxge/ge/fx_ge_font.cpp @@ -64,10 +64,8 @@ FX_BOOL CFX_Font::LoadClone(const CFX_Font* pFont) } CFX_Font::~CFX_Font() { - if (m_pSubstFont) { - delete m_pSubstFont; - m_pSubstFont = NULL; - } + delete m_pSubstFont; + m_pSubstFont = NULL; if (m_bLogic) { m_OtfFontData.DetachBuffer(); return; -- cgit v1.2.3