diff options
author | Lei Zhang <thestig@chromium.org> | 2015-07-16 18:28:49 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-07-16 18:28:49 -0700 |
commit | 21bf242a31eff79f754c5e9c3b41c52e33483bb0 (patch) | |
tree | 0eff85fa75ab9091254f7560b37b95408ba8975e /core/src/fxge/win32 | |
parent | 6915e7bd9e0892f143936697c6ba233510fb13dc (diff) | |
download | pdfium-21bf242a31eff79f754c5e9c3b41c52e33483bb0.tar.xz |
Cleanup: Do not check pointers before deleting them, part 2.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1195363002 .
Diffstat (limited to 'core/src/fxge/win32')
-rw-r--r-- | core/src/fxge/win32/fx_win32_device.cpp | 4 | ||||
-rw-r--r-- | core/src/fxge/win32/fx_win32_dwrite.cpp | 4 |
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 899adf5b7c..b0dbc14ebc 100644 --- a/core/src/fxge/win32/fx_win32_device.cpp +++ b/core/src/fxge/win32/fx_win32_device.cpp @@ -410,9 +410,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 3cde3bfd8b..889a5684b7 100644 --- a/core/src/fxge/win32/fx_win32_dwrite.cpp +++ b/core/src/fxge/win32/fx_win32_dwrite.cpp @@ -262,9 +262,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) { |