summaryrefslogtreecommitdiff
path: root/core/src/fxge/ge/fx_ge_font.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/ge/fx_ge_font.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/ge/fx_ge_font.cpp')
-rw-r--r--core/src/fxge/ge/fx_ge_font.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp
index 57580f4799..46eecff323 100644
--- a/core/src/fxge/ge/fx_ge_font.cpp
+++ b/core/src/fxge/ge/fx_ge_font.cpp
@@ -140,9 +140,6 @@ extern "C" {
FX_BOOL _LoadFile(FXFT_Library library, FXFT_Face* Face, IFX_FileRead* pFile, FXFT_Stream* stream, FX_INT32 faceIndex = 0)
{
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;
@@ -213,9 +210,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;