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:
parent
15212bccc9
commit
d9f846f783
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue