mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
* Jandor's Ring - FIxed possible null pointer exception (discard has to be a cost still lacking).
This commit is contained in:
parent
ee59ec80e2
commit
f67cd391dd
2 changed files with 39 additions and 30 deletions
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue