changeset 22045:2e1b3754ca2d

Bugfix: glyph and bitmap pointers could be left uninitialized after get_glyph(). Based on a patch by Stanislav Maslovski (stanislav d maslovski a gmail d com).
author eugeni
date Mon, 29 Jan 2007 17:08:29 +0000
parents 1169d24cecb6
children e1d6e672cd58
files libass/ass_render.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass_render.c	Mon Jan 29 14:29:00 2007 +0000
+++ b/libass/ass_render.c	Mon Jan 29 17:08:29 2007 +0000
@@ -1233,6 +1233,9 @@
 	// not found, get a new outline glyph from face
 //	mp_msg(MSGT_ASS, MSGL_INFO, "miss, index = %d, symbol = %c, adv = (%d, %d)\n", index, symbol, advance->x, advance->y);
 
+	info->outline_glyph = 0;
+	info->bm = info->bm_o = info->bm_s = 0;
+	
 	info->glyph = ass_font_get_glyph(frame_context.ass_priv->fontconfig_priv, render_context.font, symbol);
 	if (!info->glyph)
 		return 0;
@@ -1246,12 +1249,8 @@
 		if (error) {
 			mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FT_Glyph_Stroke_Error, error);
 		}
-	} else {
-		info->outline_glyph = 0;
 	}
 
-	info->bm = info->bm_o = info->bm_s = 0;
-
 	return 0;
 }