Commit 33fd436a authored by Akira TAGOH's avatar Akira TAGOH

Don't return FcFalse even when no fonts dirs is configured

parent f6d61c9b
......@@ -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)))
{
......
......@@ -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
......
......@@ -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__
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment