* Fixed possible null pointer exceptions.

This commit is contained in:
LevelX2 2016-11-26 10:22:23 +01:00
parent cd6917be93
commit 946b723361
2 changed files with 2 additions and 2 deletions

View file

@ -76,7 +76,7 @@ public class CantAttackYouAllEffect extends RestrictionEffect {
@Override
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
return (!alsoPlaneswalker && !defenderId.equals(source.getControllerId()))
|| (alsoPlaneswalker && !game.getCombat().getDefendingPlayerId(attacker.getId(), game).equals(source.getControllerId()));
|| (alsoPlaneswalker && !(source.getControllerId().equals(game.getCombat().getDefendingPlayerId(attacker.getId(), game))));
}
@Override

View file

@ -79,7 +79,7 @@ public class ManifestEffect extends OneShotEffect {
for (Card card : cards) {
ManaCosts manaCosts = null;
if (card.getCardType().contains(CardType.CREATURE)) {
manaCosts = card.getSpellAbility().getManaCosts();
manaCosts = card.getSpellAbility() != null ? card.getSpellAbility().getManaCosts() : null;
if (manaCosts == null) {
manaCosts = new ManaCostsImpl("{0}");
}