summaryrefslogtreecommitdiff
path: root/core/src/fxge/ge/fx_ge_font.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-14 15:45:39 -0700
committerLei Zhang <thestig@chromium.org>2015-08-14 15:45:39 -0700
commitcb62e7657b3a9a04142028a4e6614029a08e894b (patch)
treee7fa5f4c7d7f12bff9315475a89872fb044c36b1 /core/src/fxge/ge/fx_ge_font.cpp
parent0f6b51c0fdd14f5762bf3c7412ac59c825443cc3 (diff)
downloadpdfium-cb62e7657b3a9a04142028a4e6614029a08e894b.tar.xz
Don't bother checking pointers before delete[] and FX_Free().
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1297713003 .
Diffstat (limited to 'core/src/fxge/ge/fx_ge_font.cpp')
-rw-r--r--core/src/fxge/ge/fx_ge_font.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp
index e701ee9492..8be177ed14 100644
--- a/core/src/fxge/ge/fx_ge_font.cpp
+++ b/core/src/fxge/ge/fx_ge_font.cpp
@@ -30,10 +30,8 @@ CFX_Font::CFX_Font() {
CFX_Font::~CFX_Font() {
delete m_pSubstFont;
m_pSubstFont = NULL;
- if (m_pFontDataAllocation) {
- FX_Free(m_pFontDataAllocation);
- m_pFontDataAllocation = NULL;
- }
+ FX_Free(m_pFontDataAllocation);
+ m_pFontDataAllocation = NULL;
if (m_Face) {
if (FXFT_Get_Face_External_Stream(m_Face)) {
FXFT_Clear_Face_External_Stream(m_Face);
@@ -44,14 +42,10 @@ CFX_Font::~CFX_Font() {
CFX_GEModule::Get()->GetFontMgr()->ReleaseFace(m_Face);
}
}
- if (m_pOwnedStream) {
- FX_Free(m_pOwnedStream);
- m_pOwnedStream = NULL;
- }
- if (m_pGsubData) {
- FX_Free(m_pGsubData);
- m_pGsubData = NULL;
- }
+ FX_Free(m_pOwnedStream);
+ m_pOwnedStream = NULL;
+ FX_Free(m_pGsubData);
+ m_pGsubData = NULL;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
ReleasePlatformResource();
#endif