- NPE prevention in SpellAbilityRestriction (prevents Jhoira of the Ghitu Avatar crashing)

This commit is contained in:
Agetian
2017-01-30 09:11:29 +00:00
parent f781c2fd0b
commit 40b05f7ad4

View File

@@ -227,7 +227,7 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
if (sa.isSpell()) {
final CardPlayOption o = c.mayPlay(sa.getMayPlay());
if (o == null) {
return this.getZone() == null || cardZone.is(this.getZone());
return this.getZone() == null || (cardZone != null && cardZone.is(this.getZone()));
} else if (o.getPlayer() == activator) {
Map<String,String> params = sa.getMayPlay().getMapParams();