[MPlayer-cvslog] r23104 - trunk/libass/ass_render.c

eugeni subversion at mplayerhq.hu
Tue Apr 24 19:36:03 CEST 2007


Author: eugeni
Date: Tue Apr 24 19:36:03 2007
New Revision: 23104

Log:
Do not use FT_Glyph_Copy with NULL glyphs.
Contrary to the docs, it leaves garbage in *target.


Modified:
   trunk/libass/ass_render.c

Modified: trunk/libass/ass_render.c
==============================================================================
--- trunk/libass/ass_render.c	(original)
+++ trunk/libass/ass_render.c	Tue Apr 24 19:36:03 2007
@@ -1239,7 +1239,8 @@ static void get_outline_glyph(int symbol
 	val = cache_find_glyph(&key);
 	if (val) {
 		FT_Glyph_Copy(val->glyph, &info->glyph);
-		FT_Glyph_Copy(val->outline_glyph, &info->outline_glyph);
+		if (val->outline_glyph)
+			FT_Glyph_Copy(val->outline_glyph, &info->outline_glyph);
 		info->bbox = val->bbox_scaled;
 		info->advance.x = val->advance.x;
 		info->advance.y = val->advance.y;
@@ -1260,8 +1261,10 @@ static void get_outline_glyph(int symbol
 			}
 		}
 
+		memset(&v, 0, sizeof(v));
 		FT_Glyph_Copy(info->glyph, &v.glyph);
-		FT_Glyph_Copy(info->outline_glyph, &v.outline_glyph);
+		if (info->outline_glyph)
+			FT_Glyph_Copy(info->outline_glyph, &v.outline_glyph);
 		v.advance = info->advance;
 		v.bbox_scaled = info->bbox;
 		cache_add_glyph(&key, &v);



More information about the MPlayer-cvslog mailing list