Commit d503fc57f2a94df30b04bf19b3a215f7c65111e1

Werner Lemberg 2007-11-01T09:19:44

* src/sfnt/sfobjs.c (sfnt_done_face): Check `sfnt' everywhere. This fixes Savannah bug #21485.

diff --git a/ChangeLog b/ChangeLog
index 9b0a92a..faff6f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-01  Werner Lemberg  <wl@gnu.org>
+
+	* src/sfnt/sfobjs.c (sfnt_done_face): Check `sfnt' everywhere.  This
+	fixes Savannah bug #21485.
+
 2006-10-29  Daniel Svoboda  <dasvo@planeta@cz>
 
 	* src/winfonts/winfnt.c (FNT_Face_Init): Check first that the driver
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 00ae000..b19ef23 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -1096,7 +1096,8 @@
     face->gasp.numRanges = 0;
 
     /* freeing the name table */
-    sfnt->free_name( face );
+    if ( sfnt )
+      sfnt->free_name( face );
 
     /* freeing family and style name */
     FT_FREE( face->root.family_name );