* Orbs of Warding - Fixed possible null pointer exception.

This commit is contained in:
LevelX2 2015-07-27 23:13:15 +02:00
parent 878909809a
commit c49e18049c

View file

@ -89,7 +89,7 @@ class OrbsOfWardingEffect extends PreventionEffectImpl {
public boolean applies(GameEvent event, Ability source, Game game) { public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getTargetId().equals(source.getControllerId())) { if (event.getTargetId().equals(source.getControllerId())) {
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId());
if (permanent.getCardType().contains(CardType.CREATURE)) { if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) {
return super.applies(event, source, game); return super.applies(event, source, game);
} }
} }