Fixed NPE and bug retrieving player for gain life of Abattoir Ghoul..

This commit is contained in:
LevelX2 2013-04-21 02:41:05 +02:00
parent eb132429d6
commit 6c1b686bce

View file

@ -103,9 +103,10 @@ class AbattoirGhoulEffect extends ReplacementEffectImpl<AbattoirGhoulEffect> {
Permanent permanent = ((ZoneChangeEvent)event).getTarget();
if (permanent != null) {
MageInt toughness = permanent.getToughness();
Player player = (Player)this.getValue("player");
player.gainLife(toughness.getValue(), game);
return true;
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
player.gainLife(toughness.getValue(), game);
}
}
return false;
}