diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2009-01-08 03:04:34 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2009-02-13 16:54:06 -0800 |
commit | 25a09eb9bf2d993228a3d98d1dd271f55efb2358 (patch) | |
tree | fa3426a923de453cf802dc1585956c78e9405fa3 /src | |
parent | d230cf144f84c8a50b932c8b89daa55c1a3620d8 (diff) |
Don't use FcCharSetCopy in FcCharSetMerge
The Copy function is actually a ref, not real copy.
Diffstat (limited to 'src')
-rw-r--r-- | src/fccharset.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fccharset.c b/src/fccharset.c index 1891f08..2daa39d 100644 --- a/src/fccharset.c +++ b/src/fccharset.c @@ -459,14 +459,15 @@ FcCharSetMerge (FcCharSet *a, const FcCharSet *b) FcCharSetIter ai, bi; if (a == NULL) { - return FcCharSetCopy ((FcCharSet *) b); + fcs = a = FcCharSetCreate (); } else if (a->ref == FC_REF_CONSTANT) { fcs = FcCharSetCreate (); - if (fcs == NULL) - return NULL; } else fcs = a; + if (fcs == NULL) + return NULL; + FcCharSetIterStart (a, &ai); FcCharSetIterStart (b, &bi); while (ai.leaf || bi.leaf) |