[Bug #1291] Fix NPE when a task with a dependency is removed
FEA: ItEr75S04BugFixing
This commit is contained in:
parent
b365d3b46c
commit
62caddbd93
1 changed files with 8 additions and 2 deletions
|
|
@ -484,7 +484,10 @@ public abstract class TaskElement extends BaseEntity {
|
|||
private void detachIncomingDependencies() {
|
||||
Set<TaskElement> tasksToNotify = new HashSet<TaskElement>();
|
||||
for (Dependency dependency : dependenciesWithThisDestination) {
|
||||
tasksToNotify.add(dependency.getOrigin());
|
||||
TaskElement origin = dependency.getOrigin();
|
||||
if (origin != null) {
|
||||
tasksToNotify.add(origin);
|
||||
}
|
||||
}
|
||||
for (TaskElement taskElement : tasksToNotify) {
|
||||
taskElement.removeDependenciesWithDestination(this);
|
||||
|
|
@ -494,7 +497,10 @@ public abstract class TaskElement extends BaseEntity {
|
|||
private void detachOutcomingDependencies() {
|
||||
Set<TaskElement> tasksToNotify = new HashSet<TaskElement>();
|
||||
for (Dependency dependency : dependenciesWithThisOrigin) {
|
||||
tasksToNotify.add(dependency.getDestination());
|
||||
TaskElement destination = dependency.getDestination();
|
||||
if (destination != null) {
|
||||
tasksToNotify.add(destination);
|
||||
}
|
||||
}
|
||||
for (TaskElement taskElement : tasksToNotify) {
|
||||
taskElement.removeDependenciesWithOrigin(this);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue