From e1f145ab19691f0e401c7ebcd930b1cf506568d2 Mon Sep 17 00:00:00 2001 From: drmDev Date: Fri, 8 Apr 2016 00:24:33 -0400 Subject: [PATCH] another ZoneGroupChangeEvent NPE fix - Sidisi --- .../sets/khansoftarkir/SidisiBroodTyrant.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/SidisiBroodTyrant.java b/Mage.Sets/src/mage/sets/khansoftarkir/SidisiBroodTyrant.java index be677f414d..c5a9ff30eb 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/SidisiBroodTyrant.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/SidisiBroodTyrant.java @@ -27,6 +27,7 @@ */ package mage.sets.khansoftarkir; +import java.util.List; import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; @@ -127,11 +128,21 @@ class SidisiBroodTyrantTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { ZoneChangeGroupEvent zEvent = (ZoneChangeGroupEvent) event; - if (Zone.LIBRARY == zEvent.getFromZone() && Zone.GRAVEYARD == zEvent.getToZone()) { + if (zEvent != null && Zone.LIBRARY == zEvent.getFromZone() && Zone.GRAVEYARD == zEvent.getToZone() && zEvent.getCards() != null) { for (Card card : zEvent.getCards()) { - if (card.getOwnerId().equals(getControllerId()) && card.getCardType().contains(CardType.CREATURE)) { - return true; + if (card != null) { + + UUID cardOwnerId = card.getOwnerId(); + List cardType = card.getCardType(); + + if (cardOwnerId != null + && card.getOwnerId().equals(getControllerId()) + && cardType != null + && card.getCardType().contains(CardType.CREATURE)) { + return true; + } } + } } return false;