shithub: freetype+ttf2subf

Download patch

ref: 4091109486223c0a60cd8ba080e4891e630db24d
parent: 7b45c28dd5e55a8c67035c566ebd53c0bfa96d76
author: Werner Lemberg <[email protected]>
date: Fri Nov 3 02:57:51 EST 2000

Don't access freed variables...

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -815,7 +815,7 @@
       FT_Glyph_Transform( glyph, 0, &v );
     }
 
-    /* in case of succes, copy the bitmap to the glyph bitmap */
+    /* in case of success, copy the bitmap to the glyph bitmap */
     if ( !error )
     {
       error = ft_bitmap_glyph_init( bitmap, &dummy );
@@ -826,11 +826,11 @@
         goto Exit;
       }
 
+      /* copy advance */
+      bitmap->root.advance = glyph->advance;
+
       if ( destroy )
         FT_Done_Glyph( glyph );
-
-      /* copy advance - thanks Karsten ;-) */
-      bitmap->root.advance = glyph->advance;
 
       *the_glyph = FT_GLYPH( bitmap );
     }