mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
* Fixed some possible null pointer exceptions.
This commit is contained in:
parent
ab352100f1
commit
c82d6b5566
6 changed files with 171 additions and 160 deletions
|
|
@ -996,6 +996,10 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
Zone fromZone = game.getState().getZone(card.getMainCard().getId());
|
||||
card.cast(game, fromZone, ability, playerId);
|
||||
Spell spell = game.getStack().getSpell(ability.getId());
|
||||
if (spell == null) {
|
||||
logger.error("Got no spell from stack. ability: " + ability.getRule());
|
||||
return false;
|
||||
}
|
||||
// some effects set sourceId to cast without paying mana costs or other costs
|
||||
if (ability.getSourceId().equals(getCastSourceIdWithAlternateMana())) {
|
||||
Ability spellAbility = spell.getSpellAbility();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue