shithub: freetype+ttf2subf

Download patch

ref: 4e0c9ee155caa181072d90573bd3e4b2693f32ce
parent: e2184505b1daaea20b7d983a111482d17c75de49
author: suzuki toshiya <[email protected]>
date: Thu Sep 24 10:30:40 EDT 2009

[cache] Check the face filled by FTC_Manager_LookupFace().

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-09-24  suzuki toshiya  <[email protected]>
+
+	[cache] Check the face filled by FTC_Manager_LookupFace().
+
+	* src/cache/ftcbasic.c (ftc_basic_family_get_count): Return
+	immediately if FTC_Manager_LookupFace() fills face by NULL.
+	Such case can occur when the code is optimized by GCC-4.2.x.
+
 2009-09-23  Werner Lemberg  <[email protected]>
 
 	* docs/CHANGES: Updated.
--- a/src/cache/ftcbasic.c
+++ b/src/cache/ftcbasic.c
@@ -142,6 +142,9 @@
     error = FTC_Manager_LookupFace( manager, family->attrs.scaler.face_id,
                                     &face );
 
+    if ( error || !face )
+      return result;
+
     if ( (FT_ULong)face->num_glyphs > FT_UINT_MAX || 0 > face->num_glyphs )
     {
       FT_TRACE1(( "ftc_basic_family_get_count: too large number of glyphs " ));