From 981a3468319eb24e696bb64ba84d9631fd26f1f7 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 19 May 2015 15:19:32 -0700 Subject: Re-land: Remove FX_Alloc() null checks now that it can't return NULL. Fixes the ordering of some assignments broken when converting to checked numerics in CFX_PathData::AddPointCount(). Original Review URL: https://codereview.chromium.org/1142713005 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1135893008 --- core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'core/src/fpdfapi/fpdf_render') diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp index 7093edae47..b45d9c3e5d 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp @@ -500,9 +500,6 @@ DIB_COMP_DATA* CPDF_DIBSource::GetDecodeAndMaskArray(FX_BOOL& bDefaultDecode, FX return NULL; } DIB_COMP_DATA* pCompData = FX_Alloc(DIB_COMP_DATA, m_nComponents); - if (pCompData == NULL) { - return NULL; - } int max_data = (1 << m_bpc) - 1; CPDF_Array* pDecode = m_pDict->GetArray(FX_BSTRC("Decode")); if (pDecode) { -- cgit v1.2.3