* Fixed possible NPE in CostsImpl.

This commit is contained in:
LevelX2 2014-08-11 13:57:18 +02:00
parent 057f3aed07
commit 9ade5efde0

View file

@ -156,8 +156,10 @@ public class CostsImpl<T extends Cost> extends ArrayList<T> implements Costs<T>
public Targets getTargets() { public Targets getTargets() {
Targets targets = new Targets(); Targets targets = new Targets();
for (T cost: this) { for (T cost: this) {
if (cost.getTargets() != null) {
targets.addAll(cost.getTargets()); targets.addAll(cost.getTargets());
} }
}
return targets; return targets;
} }