[MPlayer-cvslog] r27126 - trunk/libass/ass_fontconfig.c

eugeni subversion at mplayerhq.hu
Mon Jun 23 16:46:50 CEST 2008


Author: eugeni
Date: Mon Jun 23 16:46:50 2008
New Revision: 27126

Log:
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.


Modified:
   trunk/libass/ass_fontconfig.c

Modified: trunk/libass/ass_fontconfig.c
==============================================================================
--- trunk/libass/ass_fontconfig.c	(original)
+++ trunk/libass/ass_fontconfig.c	Mon Jun 23 16:46:50 2008
@@ -423,6 +423,7 @@ fc_instance_t* fontconfig_init(ass_libra
 	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_libra
 	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;



More information about the MPlayer-cvslog mailing list