Fixed some possible exception bugs.

This commit is contained in:
LevelX2 2016-04-06 20:25:13 +02:00
parent ebac7426dc
commit 1ec61abb8e
5 changed files with 45 additions and 35 deletions

View file

@ -62,7 +62,7 @@ public class DiesAttachedTriggeredAbility extends TriggeredAbilityImpl {
if (((ZoneChangeEvent) event).isDiesEvent()) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
boolean triggered = false;
if (zEvent.getTarget().getAttachments().contains(this.getSourceId())) {
if (zEvent.getTarget().getAttachments() != null && zEvent.getTarget().getAttachments().contains(this.getSourceId())) {
triggered = true;
} else {
// If both (attachment and attached went to graveyard at the same time, the attachemnets can be already removed from the attached object.)