From 417472e317a8680123f2fa4f46e1e3c21315326d Mon Sep 17 00:00:00 2001 From: Linquize Date: Fri, 20 Sep 2013 09:02:58 +0800 Subject: [PATCH] Check error value from git_futils_find_template_dir --- src/repository.c | 4 ++-- 1 file 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; }