summaryrefslogtreecommitdiff
path: root/refs/ref-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'refs/ref-cache.c')
-rw-r--r--refs/ref-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs/ref-cache.c b/refs/ref-cache.c
index c180e0aad7..e5e5df16d8 100644
--- a/refs/ref-cache.c
+++ b/refs/ref-cache.c
@@ -539,7 +539,7 @@ static int cache_ref_iterator_seek(struct ref_iterator *ref_iterator,
*/
break;
}
- } while (slash);
+ } while (slash && dir->nr);
}
return 0;