shithub: freetype+ttf2subf

Download patch

ref: 8636c29ae87b7147d8ab61cc7b3d6a19a8a7e392
parent: 1bd6c47260977043437c7de799c5debe49a27ff3
author: Werner Lemberg <[email protected]>
date: Sun Nov 26 17:28:13 EST 2006

* src/truetype/ttobjs.c (tt_face_init): Protect against NULL pointer.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-11-26  Pierre Hanser  <[email protected]>
+
+	* src/truetype/ttobjs.c (tt_face_init): Protect against NULL pointer.
+
 2006-11-25  David Turner    <[email protected]>
 
         * src/autofit/afhints.c: add stubs to link the "ftgrid" test program
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -283,7 +283,8 @@
         /* be worth to do more checks for a few special cases.           */
         for ( nn = 0; trick_names[nn] != NULL; nn++ )
         {
-          if ( ft_strcmp( ttface->family_name, trick_names[nn] ) == 0 )
+          if ( ttface->family                                         &&
+               ft_strcmp( ttface->family_name, trick_names[nn] ) == 0 )
           {
             unpatented_hinting = 1;
             break;