summaryrefslogtreecommitdiff
path: root/src/fccharset.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fccharset.c')
-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)