summaryrefslogtreecommitdiff
path: root/src/config_file.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-03-28 16:50:49 -0700
committerRussell Belfer <rb@github.com>2014-04-01 09:48:37 -0700
commitdb0e7878d386e40080d4004e483e4845b15f8bd7 (patch)
treec93fb113c4285a376722286e5be76a6213fae66e /src/config_file.h
parent69b6ffc4c53d578800274993b5222fa5a7699f21 (diff)
downloadlibgit2-db0e7878d386e40080d4004e483e4845b15f8bd7.tar.gz
Make submodule refresh a bit smarter
This makes submodule cache refresh actually look at the timestamps from the data sources for submodules and reload as needed if they have changed since the last refresh.
Diffstat (limited to 'src/config_file.h')
-rw-r--r--src/config_file.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/config_file.h b/src/config_file.h
index d4a1a4061..fcccbd5cc 100644
--- a/src/config_file.h
+++ b/src/config_file.h
@@ -16,7 +16,8 @@ GIT_INLINE(int) git_config_file_open(git_config_backend *cfg, unsigned int level
GIT_INLINE(void) git_config_file_free(git_config_backend *cfg)
{
- cfg->free(cfg);
+ if (cfg)
+ cfg->free(cfg);
}
GIT_INLINE(int) git_config_file_get_string(