Commit 765b3082 authored by Devin Heitmueller's avatar Devin Heitmueller Committed by Rafaël Carré

freetype: avoid segfault in FaceStyleEquals()

This can happen if the font name is NULL
Signed-off-by: default avatarRafaël Carré <funman@videolan.org>
parent cd560525
...@@ -1610,6 +1610,10 @@ static int ProcessNodes( filter_t *p_filter, ...@@ -1610,6 +1610,10 @@ static int ProcessNodes( filter_t *p_filter,
if( p_font_style ) 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, rv = PushFont( &p_fonts,
p_font_style->psz_fontname, p_font_style->psz_fontname,
p_font_style->i_font_size > 0 ? p_font_style->i_font_size p_font_style->i_font_size > 0 ? p_font_style->i_font_size
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment