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