summaryrefslogtreecommitdiff
path: root/object-refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'object-refs.c')
-rw-r--r--object-refs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/object-refs.c b/object-refs.c
index 8afa227..a7d49c6 100644
--- a/object-refs.c
+++ b/object-refs.c
@@ -127,6 +127,9 @@ void mark_reachable(struct object *obj, unsigned int mask)
if (!track_object_refs)
die("cannot do reachability with object refs turned off");
+ /* nothing to lookup */
+ if (!refs_hash_size)
+ return;
/* If we've been here already, don't bother */
if (obj->flags & mask)
return;