summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.c5
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;