diff options
author | Colin Walters <walters@src.gnome.org> | 2008-08-31 16:01:02 +0000 |
---|---|---|
committer | Colin Walters <walters@src.gnome.org> | 2008-08-31 16:01:02 +0000 |
commit | 64c6dc34fd3ec49efb2172676db987e575c23d05 (patch) | |
tree | eb55c5b62ab3681067afb99ebb192b46321ff3e7 /girepository/girparser.c | |
parent | 9133d339bfedbd362fda854a1bfbd1ded1ddb3a6 (diff) | |
download | gobject-introspection-64c6dc34fd3ec49efb2172676db987e575c23d05.tar.gz |
Don't lose if we have no includedirs
* girepository/girparser.c: Don't lose if we
have no includedirs
svn path=/trunk/; revision=551
Diffstat (limited to 'girepository/girparser.c')
-rw-r--r-- | girepository/girparser.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/girepository/girparser.c b/girepository/girparser.c index 267092c3..b7ad408f 100644 --- a/girepository/girparser.c +++ b/girepository/girparser.c @@ -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; |