diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/DeltaWindow.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/DeltaWindow.java index b440774bc..2f1878891 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/DeltaWindow.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/DeltaWindow.java @@ -460,6 +460,9 @@ class DeltaWindow { } private void checkLoadable(DeltaWindowEntry ent, long need) { + if (maxMemory <= 0) + return; + int tail = next(resSlot); while (maxMemory < loaded + need) { DeltaWindowEntry cur = window[tail];