* Jandor's Ring - FIxed possible null pointer exception (discard has to be a cost still lacking).

This commit is contained in:
LevelX2 2017-07-23 20:55:57 +02:00
parent ee59ec80e2
commit f67cd391dd
2 changed files with 39 additions and 30 deletions

View file

@ -4,7 +4,6 @@ import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import java.util.UUID;
import mage.constants.WatcherScope;
import mage.constants.Zone;
import mage.game.Game;
@ -43,7 +42,9 @@ public class CastFromHandWatcher extends Watcher {
step = game.getTurn().getStep();
}
Spell spell = (Spell) game.getObject(event.getTargetId());
spellsCastFromHand.add(spell.getSourceId());
if (spell != null) {
spellsCastFromHand.add(spell.getSourceId());
}
}
}