- Fixed possible NPE in performTest checking "TargetsValid".

This commit is contained in:
Sloth
2013-02-01 17:52:33 +00:00
parent 33279a66f5
commit d9a89c0b99

View File

@@ -97,7 +97,10 @@ public class TriggerSpellAbilityCast extends Trigger {
} }
if (this.getMapParams().containsKey("TargetsValid")) { if (this.getMapParams().containsKey("TargetsValid")) {
final SpellAbility sa = si.getSpellAbility(); SpellAbility sa = spellAbility;
if (si != null) {
sa = si.getSpellAbility();
}
if (sa.getTarget() == null) { if (sa.getTarget() == null) {
if (sa.getTargetCard() == null) { if (sa.getTargetCard() == null) {
if (sa.getTargetPlayer() == null) { if (sa.getTargetPlayer() == null) {