Don't return FcFalse even when no fonts dirs is configured
This commit is contained in:
parent
f6d61c9bee
commit
33fd436a3e
|
@ -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__
|
||||
|
|
Loading…
Reference in New Issue