summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fccfg.c2
-rw-r--r--src/fcint.h3
-rw-r--r--src/fcstr.c8
3 files changed, 13 insertions, 0 deletions
diff --git a/src/fccfg.c b/src/fccfg.c
index cc2d9ee6..abf539c5 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -373,6 +373,8 @@ FcConfigAddDirList (FcConfig *config, FcSetName set, FcStrSet *dirSet)
dirlist = FcStrListCreate (dirSet);
if (!dirlist)
return FcFalse;
+ if (FcStrListGetLength (dirlist) == 0)
+ ret = FcTrue;
while ((dir = FcStrListNext (dirlist)))
{
diff --git a/src/fcint.h b/src/fcint.h
index 15e22fdb..ca6f8eff 100644
--- a/src/fcint.h
+++ b/src/fcint.h
@@ -1176,6 +1176,9 @@ FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str);
FcPrivate FcChar8 *
FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
+FcPrivate int
+FcStrListGetLength (const FcStrList *list);
+
/* fcobjs.c */
FcPrivate void
diff --git a/src/fcstr.c b/src/fcstr.c
index 29a577d1..71e033a1 100644
--- a/src/fcstr.c
+++ b/src/fcstr.c
@@ -1347,6 +1347,14 @@ FcStrListDone (FcStrList *list)
free (list);
}
+int
+FcStrListGetLength (const FcStrList *list)
+{
+ if (!list)
+ return 0;
+ return list->set->num;
+}
+
#define __fcstr__
#include "fcaliastail.h"
#undef __fcstr__