Skip to content

Commit

Permalink
Merge pull request #305 from doublep/master
Browse files Browse the repository at this point in the history
Fix potential NPE in TaskSeriesCollection
  • Loading branch information
jfree authored Jan 8, 2023
2 parents b62b85d + c77fcec commit e2d6788
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/org/jfree/data/gantt/TaskSeriesCollection.java
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,9 @@ public Number getStartValue(R rowKey, C columnKey, int subinterval) {
Task sub = task.getSubtask(subinterval);
if (sub != null) {
TimePeriod duration = sub.getDuration();
result = duration.getStart().getTime();
if (duration != null) {
result = duration.getStart().getTime();
}
}
}
return result;
Expand Down Expand Up @@ -561,7 +563,9 @@ public Number getEndValue(R rowKey, C columnKey, int subinterval) {
Task sub = task.getSubtask(subinterval);
if (sub != null) {
TimePeriod duration = sub.getDuration();
result = duration.getEnd().getTime();
if (duration != null) {
result = duration.getEnd().getTime();
}
}
}
return result;
Expand Down

0 comments on commit e2d6788

Please sign in to comment.