Commit 375f89a5 authored by Felix Paul Kühne's avatar Felix Paul Kühne

freetype: fix crash is no monotype font name was set

parent 987349d7
......@@ -1927,6 +1927,17 @@ static int Create( vlc_object_t *p_this )
#endif
}
/* set default psz_monofontname */
if( !psz_monofontfamily || !*psz_monofontfamily )
{
free( psz_monofontfamily );
#ifdef HAVE_GET_FONT_BY_FAMILY_NAME
psz_monofontfamily = strdup( DEFAULT_MONOSPACE_FAMILY );
#else
psz_monofontfamily = File_Select( DEFAULT_MONOSPACE_FONT_FILE );
#endif
}
/* Set the current font file */
p_sys->style.psz_fontname = psz_fontname;
p_sys->style.psz_monofontname = psz_monofontfamily;
......
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