mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
Fixed NPE on game.getState() usage
This commit is contained in:
parent
cf5b474c29
commit
8ce5c7f907
21 changed files with 97 additions and 83 deletions
|
|
@ -27,6 +27,9 @@ public class NamePredicate implements Predicate<MageObject> {
|
|||
|
||||
@Override
|
||||
public boolean apply(MageObject input, Game game) {
|
||||
if (name == null) {
|
||||
return false;
|
||||
}
|
||||
// If a player names a card, the player may name either half of a split card, but not both.
|
||||
// A split card has the chosen name if one of its two names matches the chosen name.
|
||||
if (input instanceof SplitCard) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue