1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-02 03:18:09 -09:00

Fixed NPE in SetCardSubtypeAttachedEffect

This commit is contained in:
magenoxx 2011-09-14 12:50:29 +04:00
parent 15212bccc9
commit d9f846f783

View file

@ -59,8 +59,10 @@ public class SetCardSubtypeAttachedEffect extends ContinuousEffectImpl<SetCardSu
Permanent equipment = game.getPermanent(source.getSourceId());
if (equipment != null && equipment.getAttachedTo() != null) {
Permanent target = game.getPermanent(equipment.getAttachedTo());
target.getSubtype().clear();
target.getSubtype().add(setSubtype);
if (target != null) {
target.getSubtype().clear();
target.getSubtype().add(setSubtype);
}
}
return true;
}