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 c0684022f..66d3d3386 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; }