Browse Source

freetype: avoid segfault in FaceStyleEquals()

This can happen if the font name is NULL

Signed-off-by: Rafaël Carré <funman@videolan.org>
pull/19/head
Devin Heitmueller 14 years ago
committed by Rafaël Carré
parent
commit
765b3082e3
  1. 4
      modules/text_renderer/freetype.c

4
modules/text_renderer/freetype.c

@ -1610,6 +1610,10 @@ static int ProcessNodes( filter_t *p_filter,
if( p_font_style )
{
/* If the font is not specified in the style, assume the system font */
if(!p_font_style->psz_fontname)
p_font_style->psz_fontname = strdup(p_sys->psz_fontfamily);
rv = PushFont( &p_fonts,
p_font_style->psz_fontname,
p_font_style->i_font_size > 0 ? p_font_style->i_font_size

Loading…
Cancel
Save