fcdefault: Add the lang object at FcConfigSubstituteWithPat() only when kind is FcMatchPattern
This commit is contained in:
parent
07e52eeb09
commit
f4103bf708
31
src/fccfg.c
31
src/fccfg.c
|
@ -1419,22 +1419,6 @@ FcConfigSubstituteWithPat (FcConfig *config,
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
case FcMatchPattern:
|
case FcMatchPattern:
|
||||||
s = config->substPattern;
|
s = config->substPattern;
|
||||||
break;
|
|
||||||
case FcMatchFont:
|
|
||||||
s = config->substFont;
|
|
||||||
break;
|
|
||||||
case FcMatchScan:
|
|
||||||
s = config->substScan;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return FcFalse;
|
|
||||||
}
|
|
||||||
|
|
||||||
st = (FcSubState *) malloc (config->maxObjects * sizeof (FcSubState));
|
|
||||||
if (!st && config->maxObjects)
|
|
||||||
return FcFalse;
|
|
||||||
FcMemAlloc (FC_MEM_SUBSTATE, config->maxObjects * sizeof (FcSubState));
|
|
||||||
|
|
||||||
strs = FcGetDefaultLangs ();
|
strs = FcGetDefaultLangs ();
|
||||||
if (strs)
|
if (strs)
|
||||||
{
|
{
|
||||||
|
@ -1451,6 +1435,21 @@ FcConfigSubstituteWithPat (FcConfig *config,
|
||||||
}
|
}
|
||||||
FcStrListDone (l);
|
FcStrListDone (l);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case FcMatchFont:
|
||||||
|
s = config->substFont;
|
||||||
|
break;
|
||||||
|
case FcMatchScan:
|
||||||
|
s = config->substScan;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return FcFalse;
|
||||||
|
}
|
||||||
|
|
||||||
|
st = (FcSubState *) malloc (config->maxObjects * sizeof (FcSubState));
|
||||||
|
if (!st && config->maxObjects)
|
||||||
|
return FcFalse;
|
||||||
|
FcMemAlloc (FC_MEM_SUBSTATE, config->maxObjects * sizeof (FcSubState));
|
||||||
|
|
||||||
if (FcDebug () & FC_DBG_EDIT)
|
if (FcDebug () & FC_DBG_EDIT)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue