mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fixed possible null pointer exception of TargetDefender.
This commit is contained in:
parent
5bf7ba68e9
commit
5095e64462
1 changed files with 1 additions and 1 deletions
|
@ -197,7 +197,7 @@ public class TargetDefender extends TargetImpl {
|
|||
public boolean canTarget(UUID id, Ability source, Game game) {
|
||||
Player player = game.getPlayer(id);
|
||||
MageObject targetSource = game.getObject(attackerId);
|
||||
if (player != null) {
|
||||
if (player != null && source != null) {
|
||||
return notTarget || (player.canBeTargetedBy(targetSource, source.getControllerId(), game) && filter.match(player, game));
|
||||
}
|
||||
Permanent permanent = game.getPermanent(id);
|
||||
|
|
Loading…
Reference in a new issue