mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
* Fixed possible NPE in CostsImpl.
This commit is contained in:
parent
057f3aed07
commit
9ade5efde0
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue