mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Fixed possible null pointer exception.
This commit is contained in:
parent
865c0047ae
commit
40689fe1b9
1 changed files with 4 additions and 0 deletions
|
@ -969,6 +969,10 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
ability.setControllerId(getId());
|
||||
if (ability.getSpellAbilityType() != SpellAbilityType.BASE) {
|
||||
ability = chooseSpellAbilityForCast(ability, game, noMana);
|
||||
if (ability == null) {
|
||||
// No ability could be cast (selected), probably because of no valid targets (happens often if a card can be cast by an effect).
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//20091005 - 601.2a
|
||||
if (ability.getSourceId() == null) {
|
||||
|
|
Loading…
Reference in a new issue