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