* src/autofit/afloader.c (af_loader_load_glyph): Fix dereference.

This must happen after the NULL check.

Taken from

  https://github.com/freetype/freetype/pull/2
This commit is contained in:
Johan Matsson 2022-11-16 07:50:52 +01:00 committed by Werner Lemberg
parent 47e61d02e6
commit 0f43a0e7eb
1 changed files with 3 additions and 1 deletions

View File

@ -216,7 +216,7 @@
FT_Error error;
FT_Size size = face->size;
FT_Size_Internal size_internal = size->internal;
FT_Size_Internal size_internal = NULL;
FT_GlyphSlot slot = face->glyph;
FT_Slot_Internal slot_internal = slot->internal;
FT_GlyphLoader gloader = slot_internal->loader;
@ -232,6 +232,8 @@
if ( !size )
return FT_THROW( Invalid_Size_Handle );
size_internal = size->internal;
FT_ZERO( &scaler );
if ( !size_internal->autohint_metrics.x_scale ||