Don't lose if we have no includedirs

* girepository/girparser.c: Don't lose if we
	have no includedirs

svn path=/trunk/; revision=551
This commit is contained in:
Colin Walters 2008-08-31 16:01:02 +00:00
parent dcd4fe622a
commit ae48f17999

View File

@ -148,13 +148,16 @@ locate_gir (const char *name, const char * const* extra_paths)
g_free (path);
path = NULL;
}
for (dir = extra_paths; *dir; dir++)
if (extra_paths != NULL)
{
path = g_build_filename (*dir, girname, NULL);
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
return path;
g_free (path);
path = NULL;
for (dir = extra_paths; *dir; dir++)
{
path = g_build_filename (*dir, girname, NULL);
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
return path;
g_free (path);
path = NULL;
}
}
g_free (girname);
return path;