From 7a3c564e2e8d7d63bb284b29185a1f43f5f1d971 Mon Sep 17 00:00:00 2001 From: David Turner Date: Thu, 11 Jan 2007 15:09:01 +0000 Subject: [PATCH] * src/base/ftobjs.c (IsMacResource): fixed a small bug that caused a crash with some Mac OS X .dfont files. Submitted by Masatake Yamoto. --- ChangeLog | 3 +++ src/base/ftobjs.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ec7b9bbb..ca6731de3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-01-11 David Turner + * src/base/ftobjs.c (IsMacResource): fixed a small bug that caused a + crash with some Mac OS X .dfont files. Submitted by Masatake Yamoto. + * autogen.sh: small fix to get it working on Mac OS X properly, the issue is that GNU libtool is called "glibtool" on this platform, and we must call "glibtoolize", since "libtoolize" doesn't exist diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index a2e682aaa..0101b70d2 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -1446,7 +1446,8 @@ face_index, aface ); FT_FREE( data_offsets ); /* POST exists in an LWFN providing a single face */ - (*aface)->num_faces = 1; + if (!error) + (*aface)->num_faces = 1; return error; } @@ -1462,7 +1463,8 @@ error = Mac_Read_sfnt_Resource( library, stream, data_offsets, count, face_index_internal, aface ); FT_FREE( data_offsets ); - (*aface)->num_faces = count; + if (!error) + (*aface)->num_faces = count; } return error;