]> source.dussan.org Git - jgit.git/commitdiff
Fix NPE in PlotCommitList 96/137096/1
authorMatthias Sohn <matthias.sohn@sap.com>
Mon, 18 Feb 2019 00:25:12 +0000 (01:25 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Mon, 18 Feb 2019 00:25:12 +0000 (01:25 +0100)
Bug: 544513
Change-Id: I2fca766bbdc441a2dca947fba5dde532de7a10fd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java

index 5e153164ade4dc40b40bfe1f063e9af2a23b19fe..45508ce0274995dcb170bf089d8274534a23cd81 100644 (file)
@@ -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.