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
|
@ -2342,7 +2342,7 @@ void
|
|||
FcConfigSetSysRoot (FcConfig *config,
|
||||
const FcChar8 *sysroot)
|
||||
{
|
||||
FcChar8 *s;
|
||||
FcChar8 *s = NULL;
|
||||
FcBool init = FcFalse;
|
||||
|
||||
if (!config)
|
||||
|
@ -2362,9 +2362,12 @@ FcConfigSetSysRoot (FcConfig *config,
|
|||
}
|
||||
}
|
||||
|
||||
if (sysroot)
|
||||
{
|
||||
s = FcStrCopyFilename (sysroot);
|
||||
if (!s)
|
||||
return;
|
||||
}
|
||||
|
||||
if (config->sysRoot)
|
||||
FcStrFree (config->sysRoot);
|
||||
|
|
Loading…
Reference in New Issue