aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fcstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fontconfig/src/fcstr.c')
-rw-r--r--fontconfig/src/fcstr.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/fontconfig/src/fcstr.c b/fontconfig/src/fcstr.c
index cdab38397..414d6dd6b 100644
--- a/fontconfig/src/fcstr.c
+++ b/fontconfig/src/fcstr.c
@@ -1217,6 +1217,17 @@ FcStrSetDel (FcStrSet *set, const FcChar8 *s)
return FcFalse;
}
+/* TODO Make public */
+static FcStrSet *
+FcStrSetReference (FcStrSet *set)
+{
+ if (FcRefIsConst (&set->ref))
+ return set;
+
+ FcRefInc (&set->ref);
+ return set;
+}
+
void
FcStrSetDestroy (FcStrSet *set)
{
@@ -1245,7 +1256,7 @@ FcStrListCreate (FcStrSet *set)
if (!list)
return 0;
list->set = set;
- FcRefInc (&set->ref);
+ FcStrSetReference (set);
list->n = 0;
return list;
}