# HG changeset patch # User eugeni # Date 1214232410 0 # Node ID bafda9ff02211f98ac86ff2e6d917c808333ce91 # Parent 795a1325f9154596ad751040659598dfb2af5b14 Only use application font dir if library->fonts_dir is not NULL. This can be the case if ass_set_fonts_dir() call is omitted, results in segfault. Never happens in the current MPlayer. diff -r 795a1325f915 -r bafda9ff0221 libass/ass_fontconfig.c --- a/libass/ass_fontconfig.c Mon Jun 23 08:58:25 2008 +0000 +++ b/libass/ass_fontconfig.c Mon Jun 23 14:46:50 2008 +0000 @@ -423,6 +423,7 @@ for (i = 0; i < library->num_fontdata; ++i) process_fontdata(priv, library, ftlibrary, i); + if (dir) { if (FcDirCacheValid((const FcChar8 *)dir) == FcFalse) { mp_msg(MSGT_ASS, MSGL_INFO, MSGTR_LIBASS_UpdatingFontCache); @@ -461,6 +462,7 @@ if (!rc) { mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FcConfigAppFontAddDirFailed); } + } priv->family_default = family ? strdup(family) : 0; priv->path_default = path ? strdup(path) : 0;