summaryrefslogtreecommitdiff
path: root/fitz/res_font.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/res_font.c')
-rw-r--r--fitz/res_font.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fitz/res_font.c b/fitz/res_font.c
index 4cf523f1..cb6bc333 100644
--- a/fitz/res_font.c
+++ b/fitz/res_font.c
@@ -164,8 +164,6 @@ fz_newfontfromfile(fz_font **fontp, char *path, int index)
return fz_rethrow(error, "cannot init freetype library");
font = fz_newfont();
- if (!font)
- return fz_rethrow(-1, "out of memory: font struct");
fterr = FT_New_Face(fz_ftlib, path, index, (FT_Face*)&font->ftface);
if (fterr)
@@ -190,8 +188,6 @@ fz_newfontfrombuffer(fz_font **fontp, unsigned char *data, int len, int index)
return fz_rethrow(error, "cannot init freetype library");
font = fz_newfont();
- if (!font)
- return fz_rethrow(-1, "out of memory: font struct");
fterr = FT_New_Memory_Face(fz_ftlib, data, len, index, (FT_Face*)&font->ftface);
if (fterr)