mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
GameState: Reduced null pointer exception probablity for getTriggered.
This commit is contained in:
parent
a3213fb786
commit
6b22afd18a
1 changed files with 1 additions and 2 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.game;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -911,7 +910,7 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
}
|
||||
|
||||
public List<TriggeredAbility> getTriggered(UUID controllerId) {
|
||||
return triggered.stream().filter(triggeredAbility -> triggeredAbility.getControllerId().equals(controllerId))
|
||||
return triggered.stream().filter(triggeredAbility -> controllerId.equals(triggeredAbility.getControllerId()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue