vlc | branch: master | Devin Heitmueller <[email protected]> | Wed 
Jan  2 13:48:02 2013 +0100| [765b3082e3320feb19ba915bc465e8d9355ec758] | 
committer: Rafaël Carré

freetype: avoid segfault in FaceStyleEquals()

This can happen if the font name is NULL

Signed-off-by: Rafaël Carré <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=765b3082e3320feb19ba915bc465e8d9355ec758
---

 modules/text_renderer/freetype.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
index eec6967..ac94c62 100644
--- a/modules/text_renderer/freetype.c
+++ b/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

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to