ref: 11f0ab7d64a45f21ccb312a3b862cbee8a486d1e
parent: 320da730d405c38739304818505983dfafdf5d1c
author: Graham Asher <[email protected]>
date: Wed Jul 24 09:58:21 EDT 2002
FIX for bug reported by Sven Neumann [[email protected]] on the FreeType development forum: "If FT_CONFIG_OPTION_INCREMENTAL is undefined (this is the default), the TrueType loader crashes in line 852 of src/truetype/ttgload.c when it tries to access face->glyph_locations.".
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -201,10 +201,15 @@
#ifdef FT_CONFIG_OPTION_INCREMENTAL
if ( !face->root.incremental_interface )
error = TT_Load_Locations( face, stream );
- if ( !error )
-#endif
+ if ( !error )
error = TT_Load_CVT ( face, stream ) ||
TT_Load_Programs ( face, stream );
+#else
+ if ( !error )
+ error = TT_Load_Locations( face, stream ) ||
+ TT_Load_CVT ( face, stream ) ||
+ TT_Load_Programs ( face, stream );
+#endif
}
/* initialize standard glyph loading routines */