Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
mingw: enable stack smashing protector
[gitweb.git]
/
sha1-name.c
diff --git
a/sha1-name.c
b/sha1-name.c
index b4f5cadae745e54d03729f135a2208a3067ad0fa..728e6f1f61ea4641272e59e6287b6b47bfe0c74e 100644
(file)
--- a/
sha1-name.c
+++ b/
sha1-name.c
@@
-1843,7
+1843,7
@@
static enum get_oid_result get_oid_with_context_1(struct repository *repo,
if (flags & GET_OID_RECORD_PATH)
oc->path = xstrdup(cp);
- if (!repo->index->cache)
+ if (!repo->index
|| !repo->index
->cache)
repo_read_index(repo);
pos = index_name_pos(repo->index, cp, namelen);
if (pos < 0)