[ZNR] fixed Skyclave Pickaxe null pointer exception (fixes #7081)

This commit is contained in:
Evan Kranzler 2020-09-23 19:56:04 -04:00
parent be3834e762
commit b39423914e

View file

@ -73,11 +73,11 @@ class SkyclavePickAxeEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
if (permanent == null) {
if (permanent == null || game.getPermanent(permanent.getAttachedTo()) == null) {
return false;
}
game.addEffect(new BoostTargetEffect(2, 2).setTargetPointer(
new FixedTarget(game.getPermanent(permanent.getAttachedTo()), game)
new FixedTarget(permanent.getAttachedTo(), game)
), source);
return true;
}