Fixed a bunch of NPE and other possible exceptions.

This commit is contained in:
LevelX2 2015-04-20 23:37:28 +02:00
parent 38b72284da
commit c2fb2de67a
12 changed files with 65 additions and 18 deletions

View file

@ -95,8 +95,8 @@ public class GameView implements Serializable {
}
for (StackObject stackObject: state.getStack()) {
if (stackObject instanceof StackAbility) {
// Stack Ability
MageObject object = game.getObject(stackObject.getSourceId());
// Stack Ability
MageObject object = ((StackAbility)stackObject).getSourceObject(game);
Card card = game.getCard(stackObject.getSourceId());
if (card != null) {
if (object != null) {