Merge pull request #2059 from linquize/git_config_get_crash

Fix segfault when calling git_config_get_* functions when a config fails to load
This commit is contained in:
Edward Thomson 2014-01-18 14:48:59 -08:00
commit b97e55f2f1

View File

@ -652,6 +652,7 @@ static int get_entry(
key = normalized; key = normalized;
} }
res = GIT_ENOTFOUND;
git_vector_foreach(&cfg->files, i, internal) { git_vector_foreach(&cfg->files, i, internal) {
if (!internal || !internal->file) if (!internal || !internal->file)
continue; continue;