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) {
|
||||
case FcMatchPattern:
|
||||
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 ();
|
||||
if (strs)
|
||||
{
|
||||
|
@ -1451,6 +1435,21 @@ FcConfigSubstituteWithPat (FcConfig *config,
|
|||
}
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue