summaryrefslogtreecommitdiff
path: root/core/src/fxge/dib/fx_dib_convert.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/dib/fx_dib_convert.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/dib/fx_dib_convert.cpp')
-rw-r--r--core/src/fxge/dib/fx_dib_convert.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/core/src/fxge/dib/fx_dib_convert.cpp b/core/src/fxge/dib/fx_dib_convert.cpp
index 69432fde4d..7ab2417a57 100644
--- a/core/src/fxge/dib/fx_dib_convert.cpp
+++ b/core/src/fxge/dib/fx_dib_convert.cpp
@@ -236,9 +236,6 @@ FX_BOOL CFX_Palette::BuildPalette(const CFX_DIBSource* pBitmap, int pal_type)
FX_Free(m_pPalette);
}
m_pPalette = FX_Alloc(FX_DWORD, 256);
- if (!m_pPalette) {
- return FALSE;
- }
int bpp = pBitmap->GetBPP() / 8;
int width = pBitmap->GetWidth();
int height = pBitmap->GetHeight();
@@ -251,13 +248,7 @@ FX_BOOL CFX_Palette::BuildPalette(const CFX_DIBSource* pBitmap, int pal_type)
m_aLut = NULL;
}
m_cLut = FX_Alloc(FX_DWORD, 4096);
- if (!m_cLut) {
- return FALSE;
- }
m_aLut = FX_Alloc(FX_DWORD, 4096);
- if (!m_aLut) {
- return FALSE;
- }
int row, col;
m_lut = 0;
for (row = 0; row < height; row++) {
@@ -872,9 +863,6 @@ FX_BOOL ConvertBuffer(FXDIB_Format dest_format, FX_LPBYTE dest_buf, int dest_pit
return ConvertBuffer(FXDIB_8bppMask, dest_buf, dest_pitch, width, height, pSrcBitmap, src_left, src_top, d_pal, pIccTransform);
}
d_pal = FX_Alloc(FX_DWORD, 256);
- if (!d_pal) {
- return FALSE;
- }
if (((src_format & 0xff) == 1 || (src_format & 0xff) == 8) && pSrcBitmap->GetPalette()) {
return _ConvertBuffer_Plt2PltRgb8(dest_buf, dest_pitch, width, height, pSrcBitmap, src_left, src_top, d_pal, pIccTransform);
} else if ((src_format & 0xff) >= 24) {