forked from External/mage
* Kiora, The Crashing Wave - Fixed possible java error (NPE).
This commit is contained in:
parent
3cd4e9ecb7
commit
97af2dbe81
1 changed files with 3 additions and 2 deletions
|
|
@ -152,8 +152,9 @@ class KioraPreventionEffect extends PreventionEffectImpl<KioraPreventionEffect>
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (super.applies(event, source, game) && event instanceof DamageEvent) {
|
||||
Permanent targetPermanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (event.getSourceId().equals(targetPermanent.getId()) || event.getTargetId().equals(targetPermanent.getId())) {
|
||||
Permanent targetPermanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
|
||||
if (targetPermanent != null
|
||||
&& (event.getSourceId().equals(targetPermanent.getId()) || event.getTargetId().equals(targetPermanent.getId()))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue