summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Matsson <mjunix@ at github>2022-11-16 07:50:52 +0100
committerWerner Lemberg <wl@gnu.org>2022-11-16 07:54:39 +0100
commit0f43a0e7ebfbda303f0b2e8b6d5db63c362233a3 (patch)
tree5b9a0fd8466c5d7440fba7ffad6b7c2f9eede363
parent47e61d02e6efb00d9e3c2b38d7fc3211a7514c7f (diff)
downloadfreetype2-0f43a0e7ebfbda303f0b2e8b6d5db63c362233a3.tar.gz
* 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
-rw-r--r--src/autofit/afloader.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index e55183a50..733354d13 100644
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -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 ||