summaryrefslogtreecommitdiffstats
path: root/libvo/font_load_ft.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/font_load_ft.c')
-rw-r--r--libvo/font_load_ft.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c
index ddaf598069..fe3845f7a9 100644
--- a/libvo/font_load_ft.c
+++ b/libvo/font_load_ft.c
@@ -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;