Bug #1506: Prevent NPE in project dashboard if there is no tasks yet

FEA: ItEr76S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2012-07-13 08:33:29 +02:00
parent b843fc9d87
commit ba2dacedb4

View file

@ -52,6 +52,9 @@ public class GanttDiagramBuilder {
GanttDiagramGraph<TaskElement, DependencyWithVisibility> graph = createFor(
order, adapter);
TaskSource taskSource = order.getTaskSource();
if (taskSource == null) {
return graph;
}
graph.addTopLevel(taskSource.getTask());
for (Dependency each : getAllDependencies(order)) {
graph.addWithoutEnforcingConstraints(DependencyWithVisibility