summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2017-11-21 15:11:50 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2017-11-21 15:11:50 +0100
commit1e3a2797660ee61fd835739240bb8a2215cede80 (patch)
treea46248d628f3737d1871d91c6530b8a3ca73c302
parenta5cf255b471ad7113247d552d5695db0cb720882 (diff)
downloadlibgit2-cmn/tmp.tar.gz
crashdebugcmn/tmp
-rw-r--r--src/attrcache.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/attrcache.c b/src/attrcache.c
index a57110684..9b4b6f8f7 100644
--- a/src/attrcache.c
+++ b/src/attrcache.c
@@ -211,6 +211,12 @@ int git_attr_cache__get(
git_attr_file_entry *entry = NULL;
git_attr_file *file = NULL, *updated = NULL;
+ if (cache == NULL) {
+ printf("the cache is NULL, repo probably freed\n");
+ printf("config 0x%p\n", repo->_config);
+ error = *((int *)0xdeadbeefdeafbeef);
+ }
+
if ((error = attr_cache_lookup(
&file, &entry, repo, attr_session, source, base, filename)) < 0)
return error;