aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2019-02-18 01:25:12 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2019-02-18 01:25:12 +0100
commitae79969715141827950af52b8c7030f0284b3d29 (patch)
tree07c2f7079b1c088b9b58a233abf58b664bf69e16 /org.eclipse.jgit
parent03689063533ec7cffa1258eec7c2bb5295541611 (diff)
downloadjgit-ae79969715141827950af52b8c7030f0284b3d29.tar.gz
jgit-ae79969715141827950af52b8c7030f0284b3d29.zip
Fix NPE in PlotCommitList
Bug: 544513 Change-Id: I2fca766bbdc441a2dca947fba5dde532de7a10fd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java3
1 files changed, 2 insertions, 1 deletions
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<L extends PlotLane> extends
final PlotCommit<L> 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.