Skip to content

Commit

Permalink
Fix crash when GIT_DIR is invalid
Browse files Browse the repository at this point in the history
We used to test if a pointer was NULL, and if it was, try to access it.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
dscho authored and Junio C Hamano committed Aug 4, 2006
1 parent 7e18e56 commit 3a3c3fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3a3c3fc

Please sign in to comment.