mirror of https://github.com/mpv-player/mpv
Fix memleak when using fontconfig without a font name.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29607 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
d7676e783e
commit
b125a31886
|
@ -1157,10 +1157,8 @@ void load_font_ft(int width, int height, font_desc_t** fontp, const char *font_n
|
|||
#ifdef CONFIG_FONTCONFIG
|
||||
if (font_fontconfig > 0)
|
||||
{
|
||||
if (!font_name)
|
||||
font_name = strdup("sans-serif");
|
||||
FcInit();
|
||||
fc_pattern = FcNameParse(font_name);
|
||||
fc_pattern = FcNameParse(font_name ? font_name : "sans-serif");
|
||||
FcConfigSubstitute(0, fc_pattern, FcMatchPattern);
|
||||
FcDefaultSubstitute(fc_pattern);
|
||||
fc_pattern2 = fc_pattern;
|
||||
|
|
Loading…
Reference in New Issue