summaryrefslogtreecommitdiff
path: root/core/src/fxge/win32
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-07-16 18:45:22 -0700
committerLei Zhang <thestig@chromium.org>2015-07-16 18:45:22 -0700
commit796c908e7b7bdde819a1e5a4bfd3576d8e8859d6 (patch)
tree8c0cd763dd9bf70bc14da8f8cb7893835a3572fe /core/src/fxge/win32
parentba026913c273a5c1c841bced288fdab03f10ad08 (diff)
downloadpdfium-796c908e7b7bdde819a1e5a4bfd3576d8e8859d6.tar.xz
Merge to XFA: Cleanup: Do not check pointers before deleting them, part 2.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1195363002 . (cherry picked from commit 21bf242a31eff79f754c5e9c3b41c52e33483bb0) Review URL: https://codereview.chromium.org/1235753006 .
Diffstat (limited to 'core/src/fxge/win32')
-rw-r--r--core/src/fxge/win32/fx_win32_device.cpp4
-rw-r--r--core/src/fxge/win32/fx_win32_dwrite.cpp4
2 files changed, 2 insertions, 6 deletions
diff --git a/core/src/fxge/win32/fx_win32_device.cpp b/core/src/fxge/win32/fx_win32_device.cpp
index b7dced9148..2802a7c533 100644
--- a/core/src/fxge/win32/fx_win32_device.cpp
+++ b/core/src/fxge/win32/fx_win32_device.cpp
@@ -413,9 +413,7 @@ void CFX_GEModule::InitPlatform()
}
void CFX_GEModule::DestroyPlatform()
{
- if (m_pPlatformData) {
- delete (CWin32Platform*)m_pPlatformData;
- }
+ delete (CWin32Platform*)m_pPlatformData;
m_pPlatformData = NULL;
}
CGdiDeviceDriver::CGdiDeviceDriver(HDC hDC, int device_class)
diff --git a/core/src/fxge/win32/fx_win32_dwrite.cpp b/core/src/fxge/win32/fx_win32_dwrite.cpp
index 28846667e5..7949888ac2 100644
--- a/core/src/fxge/win32/fx_win32_dwrite.cpp
+++ b/core/src/fxge/win32/fx_win32_dwrite.cpp
@@ -266,9 +266,7 @@ FX_BOOL CDWriteExt::DwRendingString(void* renderTarget, CFX_ClipRgn* pClipRgn, F
}
void CDWriteExt::DwDeleteRenderingTarget(void* renderTarget)
{
- if (renderTarget) {
- delete (CDwGdiTextRenderer*)renderTarget;
- }
+ delete (CDwGdiTextRenderer*)renderTarget;
}
void CDWriteExt::DwDeleteFont(void* pFont)
{