The change in 91114d18c broke remapping font paths.

Patch from Mattias Clasen

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/331
This commit is contained in:
Akira TAGOH 2022-09-28 21:39:09 +09:00
parent 0924a35b67
commit fc0e9a78d2
1 changed files with 1 additions and 5 deletions

View File

@ -1467,7 +1467,6 @@ FcStrSetAddFilenamePairWithSalt (FcStrSet *set, const FcChar8 *a, const FcChar8
{
FcChar8 *new_a = NULL;
FcChar8 *new_b = NULL;
FcChar8 *rs = NULL;
FcBool ret;
if (a)
@ -1487,10 +1486,7 @@ FcStrSetAddFilenamePairWithSalt (FcStrSet *set, const FcChar8 *a, const FcChar8
}
}
/* Override maps with new one if exists */
if (FcStrSetMemberAB (set, new_a, new_b, &rs))
{
FcStrSetDel (set, rs);
}
FcStrSetDel (set, new_a);
ret = FcStrSetAddTriple (set, new_a, new_b, salt);
if (new_a)
FcStrFree (new_a);