Check that the result of opendir is not NULL, to prevent crash for

not-existing library paths


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@12103 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2002-01-14 22:12:01 +00:00
parent f67e1db960
commit 92b3ea2f7e

View file

@ -236,9 +236,15 @@ int search_for_library_with_type (const char *library_name,
{
fprintf (stderr, " Path: %s\n", library_paths[i]);
}
dir = opendir (library_paths[i]);
if (dir == NULL)
{
/* For some reasons, we can't read that path. */
continue;
}
while ((dirbuf = readdir (dir)))
{
/* Skip if it doesn't begin with 'lib'. This implicitly