mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 04:09:54 -08:00
fixed few errors like NPE
This commit is contained in:
parent
d03ebad794
commit
595b0e0070
3 changed files with 10 additions and 9 deletions
|
|
@ -32,6 +32,9 @@ public class AttachedToMatchesFilterCondition implements Condition {
|
|||
if (attachedTo == null) {
|
||||
attachedTo = (Permanent) game.getLastKnownInformation(permanent.getAttachedTo(), Zone.BATTLEFIELD);
|
||||
}
|
||||
if (attachedTo == null) {
|
||||
return false;
|
||||
}
|
||||
if (filter.match(attachedTo, attachedTo.getControllerId(), source, game)) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue