summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-01-08 03:04:34 -0500
committerBehdad Esfahbod <behdad@behdad.org>2009-02-13 16:54:06 -0800
commit25a09eb9bf2d993228a3d98d1dd271f55efb2358 (patch)
treefa3426a923de453cf802dc1585956c78e9405fa3 /src
parentd230cf144f84c8a50b932c8b89daa55c1a3620d8 (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.c7
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)