summaryrefslogtreecommitdiff
path: root/core/src/fxge/android
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-06-19 14:51:10 -0700
committerLei Zhang <thestig@chromium.org>2015-06-19 14:51:10 -0700
commitcfac954abcab7caf47d3fa3d641c553cba998271 (patch)
tree4cd546a2377e973fec54b75c1002c8c0ff321e8f /core/src/fxge/android
parentdf558514bf5cb5750d5a7000a843f45f4170d5a4 (diff)
downloadpdfium-cfac954abcab7caf47d3fa3d641c553cba998271.tar.xz
Cleanup: Do not check pointers before deleting them.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1192743004.
Diffstat (limited to 'core/src/fxge/android')
-rw-r--r--core/src/fxge/android/fpf_skiafontmgr.cpp4
-rw-r--r--core/src/fxge/android/fpf_skiamodule.cpp4
2 files changed, 2 insertions, 6 deletions
diff --git a/core/src/fxge/android/fpf_skiafontmgr.cpp b/core/src/fxge/android/fpf_skiafontmgr.cpp
index ec7af81e79..86bb052435 100644
--- a/core/src/fxge/android/fpf_skiafontmgr.cpp
+++ b/core/src/fxge/android/fpf_skiafontmgr.cpp
@@ -245,9 +245,7 @@ CFPF_SkiaFontMgr::~CFPF_SkiaFontMgr()
m_FamilyFonts.RemoveAll();
for (int32_t i = m_FontFaces.GetUpperBound(); i >= 0; i--) {
CFPF_SkiaFontDescriptor *pFont = (CFPF_SkiaFontDescriptor*)m_FontFaces.ElementAt(i);
- if (pFont) {
- delete pFont;
- }
+ delete pFont;
}
m_FontFaces.RemoveAll();
if (m_FTLibrary) {
diff --git a/core/src/fxge/android/fpf_skiamodule.cpp b/core/src/fxge/android/fpf_skiamodule.cpp
index e6fded6317..37bfd9cabb 100644
--- a/core/src/fxge/android/fpf_skiamodule.cpp
+++ b/core/src/fxge/android/fpf_skiamodule.cpp
@@ -18,9 +18,7 @@ IFPF_DeviceModule* FPF_GetDeviceModule()
}
CFPF_SkiaDeviceModule::~CFPF_SkiaDeviceModule()
{
- if (m_pFontMgr) {
- delete m_pFontMgr;
- }
+ delete m_pFontMgr;
}
void CFPF_SkiaDeviceModule::Destroy()
{