Fixed NPE error in card icons

This commit is contained in:
Oleg Agafonov 2021-07-29 12:27:23 +04:00
parent 1d443b231c
commit dc09f279ed
2 changed files with 61 additions and 0 deletions

View file

@ -453,6 +453,7 @@ public class CardView extends SimpleCardView {
// x cost
Zone cardZone = game.getState().getZone(card.getId());
if (card.getManaCost().containsX()
&& card.getSpellAbility() != null
&& (cardZone.match(Zone.BATTLEFIELD) || cardZone.match(Zone.STACK))) {
int costX;
if (card instanceof Permanent) {