Commit 92f30c812c6d0537eb2c339f0bc81b149a090b3e

David Turner 2005-10-17T21:17:20

* src/base/ftobjs.c (FT_Open_Face): don't call FT_New_GlyphSlot and FT_New_Size if we're opening a face with face_index < 0 (which is only used for testing the format). * src/gxvalid/gxvmort0.c: removed compiler warning

diff --git a/ChangeLog b/ChangeLog
index c3e3e58..765e9bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-10-17  David Turner  <david@freetype.org>
+
+  * src/base/ftobjs.c (FT_Open_Face): don't call FT_New_GlyphSlot and
+  FT_New_Size if we're opening a face with face_index < 0 (which is only
+  used for testing the format).
+
+  * src/gxvalid/gxvmort0.c: removed compiler warning
+
 2005-10-16  David Turner  <david@freetype.org>
 
   * src/tools/apinames.c: adding new tool to extract public API
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index b36a222..471b3ab 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1716,22 +1716,25 @@
     /* now allocate a glyph slot object for the face */
     FT_TRACE4(( "FT_Open_Face: Creating glyph slot\n" ));
 
-    error = FT_New_GlyphSlot( face, NULL );
-    if ( error )
-      goto Fail;
-
-    /* finally, allocate a size object for the face */
+    if ( face_index >= 0 )
     {
-      FT_Size  size;
+      error = FT_New_GlyphSlot( face, NULL );
+      if ( error )
+        goto Fail;
+
+      /* finally, allocate a size object for the face */
+      {
+        FT_Size  size;
 
 
-      FT_TRACE4(( "FT_Open_Face: Creating size object\n" ));
+        FT_TRACE4(( "FT_Open_Face: Creating size object\n" ));
 
-      error = FT_New_Size( face, &size );
-      if ( error )
-        goto Fail;
+        error = FT_New_Size( face, &size );
+        if ( error )
+          goto Fail;
 
-      face->size = size;
+        face->size = size;
+      }
     }
 
     /* initialize internal face data */
diff --git a/src/gxvalid/gxvmort0.c b/src/gxvalid/gxvmort0.c
index bb04589..0902056 100644
--- a/src/gxvalid/gxvmort0.c
+++ b/src/gxvalid/gxvmort0.c
@@ -73,7 +73,7 @@
     FT_UShort  dontAdvance;
     FT_UShort  markLast;
     FT_UShort  reserved;
-    FT_UShort  verb;
+    FT_UShort  verb = 0;
 
     FT_UNUSED( state );
     FT_UNUSED( table );