diff options
author | Vicent Martà <vicent@github.com> | 2013-03-18 14:00:09 -0700 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-03-18 14:00:09 -0700 |
commit | 677dce8a77be0631c02acd20b23c3d4e43ccd41b (patch) | |
tree | 544e791b088130779052ca2f40fc4907fcf85b03 /src | |
parent | 15a63e2158cd42ffcd5d30d8ed3caac735ae78dc (diff) | |
parent | 48bde2f1b62d24f3982382d520bfac887537641d (diff) | |
download | libgit2-677dce8a77be0631c02acd20b23c3d4e43ccd41b.tar.gz |
Merge pull request #1080 from carlosmn/config-set-null
Failing config related test
Diffstat (limited to 'src')
-rw-r--r-- | src/config.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index d6aa3078c..c7022891d 100644 --- a/src/config.c +++ b/src/config.c @@ -362,6 +362,11 @@ int git_config_set_string(git_config *cfg, const char *name, const char *value) git_config_backend *file; file_internal *internal; + if (!value) { + giterr_set(GITERR_CONFIG, "The value to set cannot be NULL"); + return -1; + } + internal = git_vector_get(&cfg->files, 0); file = internal->file; |