Fixup: Handle patterns without family
Pointed out by Akira Tagoh.
This commit is contained in:
parent
51d40491fc
commit
e117d6768c
|
@ -525,25 +525,28 @@ FcCompareDataInit (FcPattern *pat,
|
||||||
free);
|
free);
|
||||||
|
|
||||||
elt = FcPatternObjectFindElt (pat, FC_FAMILY_OBJECT);
|
elt = FcPatternObjectFindElt (pat, FC_FAMILY_OBJECT);
|
||||||
for (l = FcPatternEltValues(elt), i = 0; l; l = FcValueListNext(l), i++)
|
if (elt)
|
||||||
{
|
{
|
||||||
key = FcValueString (&l->value);
|
for (l = FcPatternEltValues(elt), i = 0; l; l = FcValueListNext(l), i++)
|
||||||
if (!FcHashTableFind (table, key, (void **)&e))
|
|
||||||
{
|
{
|
||||||
e = malloc (sizeof (FamilyEntry));
|
key = FcValueString (&l->value);
|
||||||
e->strong_value = 1e99;
|
if (!FcHashTableFind (table, key, (void **)&e))
|
||||||
e->weak_value = 1e99;
|
{
|
||||||
FcHashTableAdd (table, (void *)key, e);
|
e = malloc (sizeof (FamilyEntry));
|
||||||
}
|
e->strong_value = 1e99;
|
||||||
if (l->binding == FcValueBindingWeak)
|
e->weak_value = 1e99;
|
||||||
{
|
FcHashTableAdd (table, (void *)key, e);
|
||||||
if (i < e->weak_value)
|
}
|
||||||
e->weak_value = i;
|
if (l->binding == FcValueBindingWeak)
|
||||||
}
|
{
|
||||||
else
|
if (i < e->weak_value)
|
||||||
{
|
e->weak_value = i;
|
||||||
if (i < e->strong_value)
|
}
|
||||||
e->strong_value = i;
|
else
|
||||||
|
{
|
||||||
|
if (i < e->strong_value)
|
||||||
|
e->strong_value = i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue