Fixup: Handle patterns without family

Pointed out by Akira Tagoh.
This commit is contained in:
Matthias Clasen 2020-08-25 07:26:32 -04:00
parent 51d40491fc
commit e117d6768c
1 changed files with 20 additions and 17 deletions

View File

@ -525,6 +525,8 @@ FcCompareDataInit (FcPattern *pat,
free);
elt = FcPatternObjectFindElt (pat, FC_FAMILY_OBJECT);
if (elt)
{
for (l = FcPatternEltValues(elt), i = 0; l; l = FcValueListNext(l), i++)
{
key = FcValueString (&l->value);
@ -546,6 +548,7 @@ FcCompareDataInit (FcPattern *pat,
e->strong_value = i;
}
}
}
data->family_hash = table;
}