forked from External/mage
Fixed NPE errors on missing card (game.getCard can't find card);
This commit is contained in:
parent
c30316512b
commit
745bfa2836
9 changed files with 25 additions and 13 deletions
|
|
@ -129,7 +129,7 @@ public class CardsImpl extends LinkedHashSet<UUID> implements Cards, Serializabl
|
|||
|
||||
@Override
|
||||
public Set<Card> getCards(FilterCard filter, Game game) {
|
||||
return stream().map(game::getCard).filter(card -> filter.match(card, game)).collect(Collectors.toSet());
|
||||
return stream().map(game::getCard).filter(Objects::nonNull).filter(card -> filter.match(card, game)).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue