diff options
| -rw-r--r-- | src/config.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index 0837500f5..042805e95 100644 --- a/src/config.c +++ b/src/config.c @@ -1182,6 +1182,8 @@ int git_config_lock(git_transaction **out, git_config *cfg) git_config_backend *backend; backend_internal *internal; + assert(cfg); + internal = git_vector_get(&cfg->backends, 0); if (!internal || !internal->backend) { giterr_set(GITERR_CONFIG, "cannot lock; the config has no backends"); @@ -1200,6 +1202,8 @@ int git_config_unlock(git_config *cfg, int commit) git_config_backend *backend; backend_internal *internal; + assert(cfg); + internal = git_vector_get(&cfg->backends, 0); if (!internal || !internal->backend) { giterr_set(GITERR_CONFIG, "cannot lock; the config has no backends"); |
