summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/config.c b/config.c
index 2bbf02d1e8..47ce8d8b8e 100644
--- a/config.c
+++ b/config.c
@@ -37,8 +37,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;