diff options
author | Linquize <linquize@yahoo.com.hk> | 2013-09-20 09:02:58 +0800 |
---|---|---|
committer | Linquize <linquize@yahoo.com.hk> | 2013-09-20 09:02:58 +0800 |
commit | 417472e317a8680123f2fa4f46e1e3c21315326d (patch) | |
tree | 24d7166e42c6afd96aef5314d0ad287c4c2cb137 /src | |
parent | 0cd1c3bb066f67ac21f1ce8730eaefc5541c1082 (diff) | |
download | libgit2-417472e317a8680123f2fa4f46e1e3c21315326d.tar.gz |
Check error value from git_futils_find_template_dir
Diffstat (limited to 'src')
-rw-r--r-- | src/repository.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/repository.c b/src/repository.c index b95ee8548..6dea48790 100644 --- a/src/repository.c +++ b/src/repository.c @@ -1145,8 +1145,8 @@ static int repo_init_structure( } if (!tdir) { - git_futils_find_template_dir(&template_buf); - tdir = template_buf.ptr; + if ((error = git_futils_find_template_dir(&template_buf)) >= 0); + tdir = template_buf.ptr; default_template = true; } |