mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Fix for getCardState causing an NPE when tokens cease to exist
This commit is contained in:
@@ -413,9 +413,12 @@ public class AllZoneUtil {
|
||||
}
|
||||
|
||||
public static Card getCardState(Card card){
|
||||
CardList zone = getCardsInZone(AllZone.getZone(card).getZoneName());
|
||||
PlayerZone zone = AllZone.getZone(card);
|
||||
if (zone == null) // for tokens
|
||||
return null;
|
||||
|
||||
for(Card c : zone){
|
||||
CardList list = getCardsInZone(zone.getZoneName());
|
||||
for(Card c : list){
|
||||
if (card.equals(c))
|
||||
return c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user