Allow config->cache to be null (as it is when $HOME is not set)
This commit is contained in:
parent
79621aa5c7
commit
ee1debfdd9
|
@ -178,7 +178,8 @@ FcConfigDestroy (FcConfig *config)
|
||||||
FcStrSetDestroy (config->acceptGlobs);
|
FcStrSetDestroy (config->acceptGlobs);
|
||||||
FcStrSetDestroy (config->rejectGlobs);
|
FcStrSetDestroy (config->rejectGlobs);
|
||||||
|
|
||||||
FcStrFree (config->cache);
|
if (config->cache)
|
||||||
|
FcStrFree (config->cache);
|
||||||
|
|
||||||
FcSubstDestroy (config->substPattern);
|
FcSubstDestroy (config->substPattern);
|
||||||
FcSubstDestroy (config->substFont);
|
FcSubstDestroy (config->substFont);
|
||||||
|
@ -211,7 +212,8 @@ FcConfigBuildFonts (FcConfig *config)
|
||||||
if (!cache)
|
if (!cache)
|
||||||
goto bail1;
|
goto bail1;
|
||||||
|
|
||||||
FcGlobalCacheLoad (cache, config->cache);
|
if (config->cache)
|
||||||
|
FcGlobalCacheLoad (cache, config->cache);
|
||||||
|
|
||||||
list = FcConfigGetFontDirs (config);
|
list = FcConfigGetFontDirs (config);
|
||||||
if (!list)
|
if (!list)
|
||||||
|
@ -230,7 +232,8 @@ FcConfigBuildFonts (FcConfig *config)
|
||||||
if (FcDebug () & FC_DBG_FONTSET)
|
if (FcDebug () & FC_DBG_FONTSET)
|
||||||
FcFontSetPrint (fonts);
|
FcFontSetPrint (fonts);
|
||||||
|
|
||||||
FcGlobalCacheSave (cache, config->cache);
|
if (config->cache)
|
||||||
|
FcGlobalCacheSave (cache, config->cache);
|
||||||
FcGlobalCacheDestroy (cache);
|
FcGlobalCacheDestroy (cache);
|
||||||
|
|
||||||
FcConfigSetFonts (config, fonts, FcSetSystem);
|
FcConfigSetFonts (config, fonts, FcSetSystem);
|
||||||
|
|
Loading…
Reference in New Issue