Try to get current instance of FcConfig as far as possible

This commit is contained in:
Akira TAGOH 2017-12-19 12:16:48 +09:00
parent 0b59a65a71
commit aa85a2b3b6
1 changed files with 2 additions and 0 deletions

View File

@ -653,6 +653,8 @@ FcFontRenderPrepare (FcConfig *config,
if (!l) if (!l)
goto bail0; goto bail0;
dir = FcStrDirname (FcValueString (&l->value)); dir = FcStrDirname (FcValueString (&l->value));
if (!config)
config = FcConfigGetCurrent ();
if (config && FcHashTableFind (config->alias_table, dir, (void **) &alias)) if (config && FcHashTableFind (config->alias_table, dir, (void **) &alias))
{ {
FcChar8 *base = FcStrBasename (FcValueString (&l->value)); FcChar8 *base = FcStrBasename (FcValueString (&l->value));