Mercurial > mplayer.hg
changeset 23086:778394a078ba
Do not use FT_Glyph_Copy with NULL glyphs.
Contrary to the docs, it leaves garbage in *target.
author | eugeni |
---|---|
date | Tue, 24 Apr 2007 17:36:03 +0000 |
parents | 7defdf1c63ef |
children | 5cca2241a04a |
files | libass/ass_render.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libass/ass_render.c Tue Apr 24 09:22:34 2007 +0000 +++ b/libass/ass_render.c Tue Apr 24 17:36:03 2007 +0000 @@ -1239,7 +1239,8 @@ 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 @@ } } + 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);