NEVER assign static strings to string command line options.

Fix crash on exit with fontconfig.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17963 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
albeu 2006-03-26 19:10:43 +00:00
parent f10f108017
commit 1bfd7289f8
1 changed files with 1 additions and 1 deletions

View File

@ -1147,7 +1147,7 @@ void load_font_ft(int width, int height)
if (font_fontconfig) if (font_fontconfig)
{ {
if (!font_name) if (!font_name)
font_name = "sans-serif"; font_name = strdup("sans-serif");
FcInit(); FcInit();
fc_pattern = FcNameParse(font_name); fc_pattern = FcNameParse(font_name);
FcConfigSubstitute(0, fc_pattern, FcMatchPattern); FcConfigSubstitute(0, fc_pattern, FcMatchPattern);