From ae79969715141827950af52b8c7030f0284b3d29 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Mon, 18 Feb 2019 01:25:12 +0100 Subject: [PATCH] Fix NPE in PlotCommitList Bug: 544513 Change-Id: I2fca766bbdc441a2dca947fba5dde532de7a10fd Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/revplot/PlotCommitList.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java index 5e153164ad..45508ce027 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java @@ -141,7 +141,8 @@ public class PlotCommitList extends final PlotCommit c = currCommit.children[0]; currCommit.lane = c.lane; Integer len = laneLength.get(currCommit.lane); - len = Integer.valueOf(len.intValue() + 1); + len = len != null ? Integer.valueOf(len.intValue() + 1) + : Integer.valueOf(0); laneLength.put(currCommit.lane, len); } else { // More than one child, or our child is a merge. -- 2.39.5