(ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
authorhanda <handa>
Tue, 15 Jan 2008 06:47:49 +0000 (06:47 +0000)
committerhanda <handa>
Tue, 15 Jan 2008 06:47:49 +0000 (06:47 +0000)
is not defined.

src/font-ft.c

index 09b651a..913292b 100644 (file)
@@ -2488,6 +2488,8 @@ ft_drive_otf (MFLTFont *font, MFLTOtfSpec *spec,
   return to;
 
  simple_copy:
+  if (otf_gstring.glyphs)
+    free (otf_gstring.glyphs);
 #endif /* HAVE_OTF */
   if (out->allocated < out->used + len)
     return -2;
@@ -2495,8 +2497,6 @@ ft_drive_otf (MFLTFont *font, MFLTOtfSpec *spec,
   memcpy ((MGlyph *)out->glyphs + out->used, (MGlyph *) in->glyphs + from,
          sizeof (MGlyph) * len);
   out->used += len;
-  if (otf_gstring.glyphs)
-    free (otf_gstring.glyphs);
   return to;
 }