From 44bbc23388f21e98ceed5a9fbe810a05e6cd180f Mon Sep 17 00:00:00 2001 From: BetaSteward Date: Tue, 4 May 2010 02:25:16 +0000 Subject: [PATCH] ... --- Mage.Common/src/mage/view/GameView.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Mage.Common/src/mage/view/GameView.java b/Mage.Common/src/mage/view/GameView.java index 0578d2c121..9a101f64a0 100644 --- a/Mage.Common/src/mage/view/GameView.java +++ b/Mage.Common/src/mage/view/GameView.java @@ -33,6 +33,7 @@ import java.util.ArrayList; import java.util.List; import mage.Constants.PhaseStep; import mage.Constants.TurnPhase; +import mage.MageObject; import mage.game.ExileZone; import mage.game.GameState; import mage.game.combat.CombatGroup; @@ -65,7 +66,11 @@ public class GameView implements Serializable { } for (StackObject stackObject: game.getStack()) { if (stackObject instanceof StackAbility) { - stack.add(new StackAbilityView((StackAbility)stackObject, game.getObject(stackObject.getSourceId()).getName())); + MageObject object = game.getObject(stackObject.getSourceId()); + if (object != null) + stack.add(new StackAbilityView((StackAbility)stackObject, object.getName())); + else + stack.add(new StackAbilityView((StackAbility)stackObject, "")); } else { stack.add(new CardView((Spell)stackObject));