Fix a crash when no sysroot is given and failed to load the default fonts.conf
This commit is contained in:
parent
f5b4b2c1ed
commit
5b22776999
11
src/fccfg.c
11
src/fccfg.c
|
@ -2342,7 +2342,7 @@ void
|
||||||
FcConfigSetSysRoot (FcConfig *config,
|
FcConfigSetSysRoot (FcConfig *config,
|
||||||
const FcChar8 *sysroot)
|
const FcChar8 *sysroot)
|
||||||
{
|
{
|
||||||
FcChar8 *s;
|
FcChar8 *s = NULL;
|
||||||
FcBool init = FcFalse;
|
FcBool init = FcFalse;
|
||||||
|
|
||||||
if (!config)
|
if (!config)
|
||||||
|
@ -2362,9 +2362,12 @@ FcConfigSetSysRoot (FcConfig *config,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s = FcStrCopyFilename (sysroot);
|
if (sysroot)
|
||||||
if (!s)
|
{
|
||||||
return;
|
s = FcStrCopyFilename (sysroot);
|
||||||
|
if (!s)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (config->sysRoot)
|
if (config->sysRoot)
|
||||||
FcStrFree (config->sysRoot);
|
FcStrFree (config->sysRoot);
|
||||||
|
|
Loading…
Reference in New Issue