diff options
author | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-04-24 17:36:03 +0000 |
---|---|---|
committer | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-04-24 17:36:03 +0000 |
commit | b95a3ee1b5f11a2629ce05ab86e5926d6ff1e5b0 (patch) | |
tree | 8e635e1bccbe80eae4c050450d952f8df039ed7d /libass | |
parent | 2d49463a2b1f01394b21bde21e8bad066bffbdc3 (diff) | |
download | libass-b95a3ee1b5f11a2629ce05ab86e5926d6ff1e5b0.tar.bz2 libass-b95a3ee1b5f11a2629ce05ab86e5926d6ff1e5b0.tar.xz |
Do not use FT_Glyph_Copy with NULL glyphs.
Contrary to the docs, it leaves garbage in *target.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23104 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass')
-rw-r--r-- | libass/ass_render.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index 567e5583..e499770b 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1239,7 +1239,8 @@ static void get_outline_glyph(int symbol, glyph_info_t* info, FT_Vector* advance 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, glyph_info_t* info, FT_Vector* advance } } + 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); |