summaryrefslogtreecommitdiff
path: root/core/src/fxge/win32/fx_win32_dib.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-05-20 09:50:37 -0700
committerTom Sepez <tsepez@chromium.org>2015-05-20 09:50:37 -0700
commitd50b172a9d3a05704748f0798b5aaa422485abbd (patch)
tree0289d99b370b8526c539fc676004bf622f5228a3 /core/src/fxge/win32/fx_win32_dib.cpp
parent90a4181194dd8eca153cf2a101ec27e382b27a58 (diff)
downloadpdfium-d50b172a9d3a05704748f0798b5aaa422485abbd.tar.xz
Merge to XFA: Remove FX_Alloc() null checks now that it can't return NULL.
Original Review URL: https://codereview.chromium.org/1142713005 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1143663008
Diffstat (limited to 'core/src/fxge/win32/fx_win32_dib.cpp')
-rw-r--r--core/src/fxge/win32/fx_win32_dib.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/core/src/fxge/win32/fx_win32_dib.cpp b/core/src/fxge/win32/fx_win32_dib.cpp
index 2ecf539ff7..40fb511a5f 100644
--- a/core/src/fxge/win32/fx_win32_dib.cpp
+++ b/core/src/fxge/win32/fx_win32_dib.cpp
@@ -72,12 +72,6 @@ CFX_DIBitmap* _FX_WindowsDIB_LoadFromBuf(BITMAPINFO* pbmi, LPVOID pData, FX_BOOL
FXSYS_memcpy32(pBitmap->GetBuffer(), pData, pitch * height);
if (bBottomUp) {
FX_LPBYTE temp_buf = FX_Alloc(FX_BYTE, pitch);
- if (!temp_buf) {
- if (pBitmap) {
- delete pBitmap;
- }
- return NULL;
- }
int top = 0, bottom = height - 1;
while (top < bottom) {
FXSYS_memcpy32(temp_buf, pBitmap->GetBuffer() + top * pitch, pitch);
@@ -217,13 +211,6 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadFromDDB(HDC hDC, HBITMAP hBitmap, FX_DWORD* pP
size += sizeof (FX_DWORD) * 254;
}
BITMAPINFO* pbmih = (BITMAPINFO*)FX_Alloc(FX_BYTE, size);
- if (!pbmih) {
- delete pDIBitmap;
- if (bCreatedDC) {
- DeleteDC(hDC);
- }
- return NULL;
- }
pbmih->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
pbmih->bmiHeader.biBitCount = bmih.biBitCount;
pbmih->bmiHeader.biCompression = BI_RGB;