From 44005cd35880da283414033883e8ee49ea1a9dd0 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 3 May 2004 21:31:43 +0000 Subject: [PATCH] * src/sfnt/ttload.c (tt_face_free_names): Check that `table->names' is not NULL. Reported by Gordon Childs . --- ChangeLog | 5 +++++ src/sfnt/ttload.c | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index dcbdba5d4..866c4bacc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-05-02 Werner Lemberg + + * src/sfnt/ttload.c (tt_face_free_names): Check that `table->names' + is not NULL. Reported by Gordon Childs . + 2004-04-29 Werner Lemberg * docs/formats.txt: Add more information on PFR format. diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c index d1b0b208b..95d49b9e1 100644 --- a/src/sfnt/ttload.c +++ b/src/sfnt/ttload.c @@ -1198,14 +1198,17 @@ FT_UInt count = table->numNameRecords; - for ( ; count > 0; count--, entry++ ) + if ( table->names ) { - FT_FREE( entry->string ); - entry->stringLength = 0; - } + for ( ; count > 0; count--, entry++ ) + { + FT_FREE( entry->string ); + entry->stringLength = 0; + } - /* free strings table */ - FT_FREE( table->names ); + /* free strings table */ + FT_FREE( table->names ); + } table->numNameRecords = 0; table->format = 0;