mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +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,7 +156,9 @@ public class CostsImpl<T extends Cost> extends ArrayList<T> implements Costs<T>
|
|||
public Targets getTargets() {
|
||||
Targets targets = new Targets();
|
||||
for (T cost: this) {
|
||||
targets.addAll(cost.getTargets());
|
||||
if (cost.getTargets() != null) {
|
||||
targets.addAll(cost.getTargets());
|
||||
}
|
||||
}
|
||||
return targets;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue