ignorecase: Don't crash if enumeration returned a NULL pointer.
This commit is contained in:
parent
d08188c1e0
commit
be0afe31e3
|
@ -50,6 +50,8 @@ static int locateOneElement(char *buf)
|
||||||
ptr++; /* point past dirsep to entry itself. */
|
ptr++; /* point past dirsep to entry itself. */
|
||||||
} /* else */
|
} /* else */
|
||||||
|
|
||||||
|
if (rc != NULL)
|
||||||
|
{
|
||||||
for (i = rc; *i != NULL; i++)
|
for (i = rc; *i != NULL; i++)
|
||||||
{
|
{
|
||||||
if (PHYSFS_utf8stricmp(*i, ptr) == 0)
|
if (PHYSFS_utf8stricmp(*i, ptr) == 0)
|
||||||
|
@ -60,8 +62,10 @@ static int locateOneElement(char *buf)
|
||||||
} /* if */
|
} /* if */
|
||||||
} /* for */
|
} /* for */
|
||||||
|
|
||||||
/* no match at all... */
|
|
||||||
PHYSFS_freeList(rc);
|
PHYSFS_freeList(rc);
|
||||||
|
} /* if */
|
||||||
|
|
||||||
|
/* no match at all... */
|
||||||
return 0;
|
return 0;
|
||||||
} /* locateOneElement */
|
} /* locateOneElement */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue