mirror of
https://github.com/mpv-player/mpv
synced 2025-03-02 20:28:02 +00:00
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27126 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e8ff7f29f6
commit
839c865ad8
@ -423,6 +423,7 @@ fc_instance_t* fontconfig_init(ass_library_t* library, FT_Library ftlibrary, con
|
||||
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 @@ fc_instance_t* fontconfig_init(ass_library_t* library, FT_Library ftlibrary, con
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user