From 88484f5a1ea24a7f606bae65ef3d6f14dd2d89ba Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sat, 21 Aug 2021 20:05:45 +0400 Subject: [PATCH] * GUI: fixed that Card Viewer can't open tokens list; --- Mage.Common/src/main/java/mage/view/CardView.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Mage.Common/src/main/java/mage/view/CardView.java b/Mage.Common/src/main/java/mage/view/CardView.java index 6f2f0f1265..7462791f79 100644 --- a/Mage.Common/src/main/java/mage/view/CardView.java +++ b/Mage.Common/src/main/java/mage/view/CardView.java @@ -429,9 +429,11 @@ public class CardView extends SimpleCardView { this.cardIcons.add(FaceDownCardIcon.instance); } // commander - Player owner = game.getPlayer(game.getOwnerId(permanent)); - if (owner != null && game.isCommanderObject(owner, permanent)) { - this.cardIcons.add(CommanderCardIcon.instance); + if (game != null) { + Player owner = game.getPlayer(game.getOwnerId(permanent)); + if (owner != null && game.isCommanderObject(owner, permanent)) { + this.cardIcons.add(CommanderCardIcon.instance); + } } } else { if (card.isCopy()) {