diff options
Diffstat (limited to 'freetype')
-rw-r--r-- | freetype/src/base/ftobjs.c | 3 | ||||
-rw-r--r-- | freetype/src/type1/t1objs.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/freetype/src/base/ftobjs.c b/freetype/src/base/ftobjs.c index eeda69c3e..5eb4122a2 100644 --- a/freetype/src/base/ftobjs.c +++ b/freetype/src/base/ftobjs.c @@ -632,7 +632,8 @@ if ( slot->face->face_flags & FT_FACE_FLAG_SVG ) { /* free memory in case SVG was there */ - if ( slot->internal->flags & FT_GLYPH_OWN_GZIP_SVG ) + /* `slot->internal` might be NULL in out-of-memory situations. */ + if ( slot->internal && slot->internal->flags & FT_GLYPH_OWN_GZIP_SVG ) { FT_SVG_Document doc = (FT_SVG_Document)slot->other; diff --git a/freetype/src/type1/t1objs.c b/freetype/src/type1/t1objs.c index 847ae0e64..fa4a13b53 100644 --- a/freetype/src/type1/t1objs.c +++ b/freetype/src/type1/t1objs.c @@ -146,7 +146,9 @@ FT_LOCAL_DEF( void ) T1_GlyphSlot_Done( FT_GlyphSlot slot ) { - slot->internal->glyph_hints = NULL; + /* `slot->internal` might be NULL in out-of-memory situations. */ + if ( slot->internal ) + slot->internal->glyph_hints = NULL; } |