aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/PackChunk.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/PackChunk.java b/org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/PackChunk.java
index c0684022f3..66d3d3386b 100644
--- a/org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/PackChunk.java
+++ b/org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/PackChunk.java
@@ -291,7 +291,7 @@ public final class PackChunk {
}
int findOffset(RepositoryKey repo, AnyObjectId objId) {
- if (key.getRepositoryId() == repo.asInt())
+ if (key.getRepositoryId() == repo.asInt() && index != null)
return index.findOffset(objId);
return -1;
}