Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
37b718d5
by Chris Liddell at 2022-08-21T19:41:45+02:00
2 changed files:
Changes:
... | ... | @@ -631,8 +631,9 @@ |
631 | 631 | #ifdef FT_CONFIG_OPTION_SVG
|
632 | 632 | if ( slot->face->face_flags & FT_FACE_FLAG_SVG )
|
633 | 633 | {
|
634 | - /* free memory in case SVG was there */
|
|
635 | - if ( slot->internal->flags & FT_GLYPH_OWN_GZIP_SVG )
|
|
634 | + /* Free memory in case SVG was there. */
|
|
635 | + /* `slot->internal` might be NULL in out-of-memory situations. */
|
|
636 | + if ( slot->internal && slot->internal->flags & FT_GLYPH_OWN_GZIP_SVG )
|
|
636 | 637 | {
|
637 | 638 | FT_SVG_Document doc = (FT_SVG_Document)slot->other;
|
638 | 639 |
... | ... | @@ -146,7 +146,9 @@ |
146 | 146 | FT_LOCAL_DEF( void )
|
147 | 147 | T1_GlyphSlot_Done( FT_GlyphSlot slot )
|
148 | 148 | {
|
149 | - slot->internal->glyph_hints = NULL;
|
|
149 | + /* `slot->internal` might be NULL in out-of-memory situations. */
|
|
150 | + if ( slot->internal )
|
|
151 | + slot->internal->glyph_hints = NULL;
|
|
150 | 152 | }
|
151 | 153 | |
152 | 154 |