提交 3a3c3fc4 编写于 作者: J Johannes Schindelin 提交者: Junio C Hamano

Fix crash when GIT_DIR is invalid

We used to test if a pointer was NULL, and if it was, try to access it.
Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 7e18e569
......@@ -184,7 +184,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
}
return NULL;
bad_dir_environ:
if (!nongit_ok) {
if (nongit_ok) {
*nongit_ok = 1;
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册