summaryrefslogtreecommitdiff
path: root/core/src/fxge/win32/fx_win32_gdipext.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-16 09:13:02 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-16 09:13:02 -0700
commit3f754d483e257f0d373be28a64b58620b4e0953f (patch)
tree51dbd10bcfc25572ab5a6a70eba2eab0f6bf3131 /core/src/fxge/win32/fx_win32_gdipext.cpp
parent026623249c78ba305c874cc093a035ef5a4cd1b4 (diff)
downloadpdfium-3f754d483e257f0d373be28a64b58620b4e0953f.tar.xz
Remove checks in fxge/{apple,win32,skia,dib} now that FX_NEW cant return 0
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1062863006
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);
}