diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java index c74a29842..d48a2d726 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java @@ -617,6 +617,9 @@ public boolean equals(Object other) { if (other == null) { return false; } + if (!(other instanceof Segment)) { + return false; + } Segment o = (Segment) other; return o.bytes == bytes && o.log == log && o.start == start && o.end == end;