From 1f68e4f9ba05fec47d034cdbd8c85526a4202476 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Thu, 13 Apr 2023 14:35:43 +0400 Subject: [PATCH] GUI: fixed that Card Viewer can't open tokens list; --- Mage.Common/src/main/java/mage/view/PermanentView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Common/src/main/java/mage/view/PermanentView.java b/Mage.Common/src/main/java/mage/view/PermanentView.java index 34ca1e0af5..de65c427b4 100644 --- a/Mage.Common/src/main/java/mage/view/PermanentView.java +++ b/Mage.Common/src/main/java/mage/view/PermanentView.java @@ -53,7 +53,7 @@ public class PermanentView extends CardView { this.attachedTo = permanent.getAttachedTo(); // show face down cards to all players at the game end - boolean showFaceDownInfo = controlled || game.hasEnded(); + boolean showFaceDownInfo = controlled || (game != null && game.hasEnded()); if (isToken()) { original = new CardView(((PermanentToken) permanent).getToken().copy(), (Game) null);