From 65ff88d244103d24fd2367d19aaf7ddfedb01ac9 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 28 Jul 2015 00:07:51 +0200 Subject: [PATCH] Fixed some possible null pointer exceptions. --- Mage/src/mage/game/permanent/PermanentImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Mage/src/mage/game/permanent/PermanentImpl.java b/Mage/src/mage/game/permanent/PermanentImpl.java index 1085eeecc8..93b2f355be 100644 --- a/Mage/src/mage/game/permanent/PermanentImpl.java +++ b/Mage/src/mage/game/permanent/PermanentImpl.java @@ -899,10 +899,10 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { } @Override - public void entersBattlefield(UUID sourceId, Game game, Zone fromZone, boolean fireEvent) { + public boolean entersBattlefield(UUID sourceId, Game game, Zone fromZone, boolean fireEvent) { controlledFromStartOfControllerTurn = false; if (this.isFaceDown(game)) { - // remove some attributes here, bceause first apply effects comes later otherwise abilities (e.g. color related) will unintended trigger + // remove some attributes here, because first apply effects comes later otherwise abilities (e.g. color related) will unintended trigger MorphAbility.setPermanentToFaceDownCreature(this); } EntersTheBattlefieldEvent event = new EntersTheBattlefieldEvent(this, sourceId, getControllerId(), fromZone); @@ -914,7 +914,9 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { game.addSimultaneousEvent(event); } } + return true; } + return false; } @Override