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/fxge/ge/fx_ge_font.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'core/src/fxge/ge/fx_ge_font.cpp') diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp index 104a23998d..1896218cbf 100644 --- a/core/src/fxge/ge/fx_ge_font.cpp +++ b/core/src/fxge/ge/fx_ge_font.cpp @@ -104,9 +104,6 @@ extern "C" { FX_BOOL _LoadFile(FXFT_Library library, FXFT_Face* Face, IFX_FileRead* pFile, FXFT_Stream* stream) { FXFT_Stream stream1 = (FXFT_Stream)FX_Alloc(FX_BYTE, sizeof (FXFT_StreamRec)); - if (!stream1) { - return FALSE; - } stream1->base = NULL; stream1->size = (unsigned long)pFile->GetSize(); stream1->pos = 0; @@ -177,9 +174,6 @@ static FXFT_Face FT_LoadFont(FX_LPBYTE pData, int size) FX_BOOL CFX_Font::LoadEmbedded(FX_LPCBYTE data, FX_DWORD size) { m_pFontDataAllocation = FX_Alloc(FX_BYTE, size); - if (!m_pFontDataAllocation) { - return FALSE; - } FXSYS_memcpy32(m_pFontDataAllocation, data, size); m_Face = FT_LoadFont((FX_LPBYTE)m_pFontDataAllocation, size); m_pFontData = (FX_LPBYTE)m_pFontDataAllocation; -- cgit v1.2.3