* Valakut, the Molten Pinnacle - Fixed possible null pointer exception.

This commit is contained in:
LevelX2 2015-09-06 22:11:42 +02:00
parent 92f384364a
commit b8f0c38101

View file

@ -106,7 +106,7 @@ class ValakutTheMoltenPinnacleTriggeredAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Permanent permanent = game.getPermanent(event.getTargetId());
if (permanent.getCardType().contains(CardType.LAND) && permanent.getControllerId().equals(this.getControllerId())) {
if (permanent != null && permanent.getCardType().contains(CardType.LAND) && permanent.getControllerId().equals(this.getControllerId())) {
if (permanent.hasSubtype("Mountain")) {
return true;
}