mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
try to fix NPE
This commit is contained in:
@@ -74,12 +74,15 @@ public class VStack extends FDropDown {
|
|||||||
|
|
||||||
final Set<ZoneType> zones = new HashSet<>();
|
final Set<ZoneType> zones = new HashSet<>();
|
||||||
playersWithValidTargets = new HashMap<>();
|
playersWithValidTargets = new HashMap<>();
|
||||||
for (final CardView c : activeStackInstance.getTargetCards()) {
|
FCollectionView<CardView> targetCards = activeStackInstance.getTargetCards();
|
||||||
|
if (targetCards != null) {
|
||||||
|
for (final CardView c : targetCards) {
|
||||||
if (c.getZone() != null) {
|
if (c.getZone() != null) {
|
||||||
zones.add(c.getZone());
|
zones.add(c.getZone());
|
||||||
playersWithValidTargets.put(c.getController(), c);
|
playersWithValidTargets.put(c.getController(), c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (zones.isEmpty() || playersWithValidTargets.isEmpty()) { return; }
|
if (zones.isEmpty() || playersWithValidTargets.isEmpty()) { return; }
|
||||||
restorablePlayerZones = MatchController.instance.openZones(player, zones, playersWithValidTargets, true);
|
restorablePlayerZones = MatchController.instance.openZones(player, zones, playersWithValidTargets, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user