@matheusbsbs / matheus-bagliano / commits / 3a3c3fc42a
Fork 0

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: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>

Johannes Schindelin committed Aug 4, 2006 at 17:46 UTC 3a3c3fc42a021f11aa8f35dc40cc69d4d4af7224
1 file changed +1 -1
setup.c
+1 -1
@@ -184,7 +184,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
184 }
185 return NULL;
186 bad_dir_environ:
187 - if (!nongit_ok) {
187 + if (nongit_ok) {
188 *nongit_ok = 1;
189 return NULL;
190 }