summaryrefslogtreecommitdiff
path: root/core/src/fxge/win32
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxge/win32')
-rw-r--r--core/src/fxge/win32/fx_win32_dib.cpp12
-rw-r--r--core/src/fxge/win32/fx_win32_print.cpp4
2 files changed, 4 insertions, 12 deletions
diff --git a/core/src/fxge/win32/fx_win32_dib.cpp b/core/src/fxge/win32/fx_win32_dib.cpp
index a57b04688a..b6455c3570 100644
--- a/core/src/fxge/win32/fx_win32_dib.cpp
+++ b/core/src/fxge/win32/fx_win32_dib.cpp
@@ -142,9 +142,7 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadFromFile(const FX_WCHAR* filename)
CFX_ByteString info = GetBitmapInfo(pDIBitmap);
int ret = GetDIBits(hDC, hBitmap, 0, height, pDIBitmap->GetBuffer(), (BITMAPINFO*)info.c_str(), DIB_RGB_COLORS);
if (!ret) {
- if (pDIBitmap) {
- delete pDIBitmap;
- }
+ delete pDIBitmap;
pDIBitmap = NULL;
}
DeleteDC(hDC);
@@ -178,9 +176,7 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadDIBitmap(WINDIB_Open_Args_ args)
CFX_ByteString info = GetBitmapInfo(pDIBitmap);
int ret = GetDIBits(hDC, hBitmap, 0, height, pDIBitmap->GetBuffer(), (BITMAPINFO*)info.c_str(), DIB_RGB_COLORS);
if (!ret) {
- if (pDIBitmap) {
- delete pDIBitmap;
- }
+ delete pDIBitmap;
pDIBitmap = NULL;
}
DeleteDC(hDC);
@@ -255,9 +251,7 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadFromDDB(HDC hDC, HBITMAP hBitmap, FX_DWORD* pP
}
}
if (ret == 0) {
- if (pDIBitmap) {
- delete pDIBitmap;
- }
+ delete pDIBitmap;
pDIBitmap = NULL;
}
if (bCreatedDC) {
diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp
index 74d0a3cabf..163ee84a0a 100644
--- a/core/src/fxge/win32/fx_win32_print.cpp
+++ b/core/src/fxge/win32/fx_win32_print.cpp
@@ -279,9 +279,7 @@ CPSPrinterDriver::CPSPrinterDriver()
CPSPrinterDriver::~CPSPrinterDriver()
{
EndRendering();
- if (m_pPSOutput) {
- delete m_pPSOutput;
- }
+ delete m_pPSOutput;
}
FX_BOOL CPSPrinterDriver::Init(HDC hDC, int pslevel, FX_BOOL bCmykOutput)
{