Check if FS_LIstFiles() returned NULL.

This would have prevented the 7.44 release f*ckup. In practise this
shoudl never happen, because there's always baseq2/ but you never know
and it's better to be sure.
This commit is contained in:
Yamagi 2020-10-19 17:19:44 +02:00
parent 5ed882763a
commit 36d64aaefb

View file

@ -1837,6 +1837,11 @@ FS_ListMods(int *nummods)
dirchildren = FS_ListFiles(searchpath, &numdirchildren, 0, 0);
if (dirchildren == NULL)
{
continue;
}
// iterate over the children of this Raw path (unless we've already got enough mods)
for (int i = 0; i < numdirchildren && nmods < MAX_MODS; i++)
{