Merge branch 'jk/config-path-include-fix'
[gitweb.git] / config.c
index d969a5aefc2bca92938d3fd7f6a507e884ce2b7f..314d8ee740bea488d8c79d80b3d91530ad15252d 100644 (file)
--- a/config.c
+++ b/config.c
@@ -84,8 +84,12 @@ static int handle_path_include(const char *path, struct config_include_data *inc
 {
        int ret = 0;
        struct strbuf buf = STRBUF_INIT;
-       char *expanded = expand_user_path(path);
+       char *expanded;
 
+       if (!path)
+               return config_error_nonbool("include.path");
+
+       expanded = expand_user_path(path);
        if (!expanded)
                return error("Could not expand include path '%s'", path);
        path = expanded;