filter can be null

This commit is contained in:
Akira TAGOH 2015-02-25 17:36:50 +09:00
parent 45018e6979
commit dd427253cc
1 changed files with 1 additions and 1 deletions

View File

@ -213,7 +213,7 @@ FcScandir (const char *dirp,
*dlist = NULL;
while ((dent = readdir (d)))
{
if ((filter) (dent))
if (!filter || (filter) (dent))
{
p = (struct dirent *) malloc (sizeof (struct dirent));
memcpy (p, dent, sizeof (struct dirent));