aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit
diff options
context:
space:
mode:
authorYunjie Li <yunjieli@google.com>2020-02-25 17:29:38 -0800
committerYunjie Li <yunjieli@google.com>2020-02-26 12:03:58 -0800
commit7ba261fb5f516dce83adc6f3bd4ac1666a51193e (patch)
treea8b95b6e3922dd213ecf84cb9d2cab84609e2b90 /org.eclipse.jgit/src/org/eclipse/jgit
parentf63583928fc1784a98082e46fcb5d8c5445afb08 (diff)
downloadjgit-7ba261fb5f516dce83adc6f3bd4ac1666a51193e.tar.gz
jgit-7ba261fb5f516dce83adc6f3bd4ac1666a51193e.zip
ObjectWalk: Add null check before skip tree.
currVisit could be null if a blob is marked as start point in ObjectWalk. Add null check before skipping current tree. Change-Id: Ic5d876fe2800f3373d136979be6c27d1bbd38dc1 Signed-off-by: Yunjie Li <yunjieli@google.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java
index 21ce78e7e9..04a4b4c631 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java
@@ -364,7 +364,9 @@ public class ObjectWalk extends RevWalk {
* @since 5.4
*/
public void skipTree() {
- currVisit.ptr = currVisit.buf.length;
+ if (currVisit != null) {
+ currVisit.ptr = currVisit.buf.length;
+ }
}
/**