summaryrefslogtreecommitdiff
path: root/core/src/fxge/apple
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/apple
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/apple')
-rw-r--r--core/src/fxge/apple/apple_int.h4
-rw-r--r--core/src/fxge/apple/fx_quartz_device.cpp2
2 files changed, 2 insertions, 4 deletions
diff --git a/core/src/fxge/apple/apple_int.h b/core/src/fxge/apple/apple_int.h
index 48476c39a7..715e48d6c2 100644
--- a/core/src/fxge/apple/apple_int.h
+++ b/core/src/fxge/apple/apple_int.h
@@ -71,9 +71,7 @@ public:
}
~CApplePlatform()
{
- if (m_pFontMapper) {
- delete m_pFontMapper;
- }
+ delete m_pFontMapper;
}
CQuartz2D _quartz2d;
IFX_FontMapper* m_pFontMapper;
diff --git a/core/src/fxge/apple/fx_quartz_device.cpp b/core/src/fxge/apple/fx_quartz_device.cpp
index 8f0f4db6ba..d1e4f544ba 100644
--- a/core/src/fxge/apple/fx_quartz_device.cpp
+++ b/core/src/fxge/apple/fx_quartz_device.cpp
@@ -1082,7 +1082,7 @@ CFX_QuartzDevice::~CFX_QuartzDevice()
if (m_pContext) {
CGContextRelease(m_pContext);
}
- if (GetBitmap() && m_bOwnedBitmap) {
+ if (m_bOwnedBitmap) {
delete GetBitmap();
}
}