summaryrefslogtreecommitdiff
path: root/core/src/fxge/win32/fx_win32_gdipext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxge/win32/fx_win32_gdipext.cpp')
-rw-r--r--core/src/fxge/win32/fx_win32_gdipext.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/core/src/fxge/win32/fx_win32_gdipext.cpp b/core/src/fxge/win32/fx_win32_gdipext.cpp
index e668b49200..fae1883f4d 100644
--- a/core/src/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/src/fxge/win32/fx_win32_gdipext.cpp
@@ -302,10 +302,7 @@ static CFX_DIBitmap* _StretchMonoToGray(int dest_width, int dest_height,
int result_width = pClipRect->Width();
int result_height = pClipRect->Height();
int result_pitch = (result_width + 3) / 4 * 4;
- CFX_DIBitmap* pStretched = FX_NEW CFX_DIBitmap;
- if (!pStretched) {
- return NULL;
- }
+ CFX_DIBitmap* pStretched = new CFX_DIBitmap;
if (!pStretched->Create(result_width, result_height, FXDIB_8bppRgb)) {
delete pStretched;
return NULL;
@@ -1164,10 +1161,7 @@ static PREVIEW3_DIBITMAP* LoadDIBitmap(WINDIB_Open_Args_ args)
if (args.memory_size == 0 || !args.memory_base) {
return NULL;
}
- pStream = FX_NEW GpStream;
- if (!pStream) {
- return NULL;
- }
+ pStream = new GpStream;
pStream->Write(args.memory_base, (ULONG)args.memory_size, NULL);
status = CallFunc(GdipCreateBitmapFromStreamICM)(pStream, &pBitmap);
}