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,10 +74,13 @@ 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 (c.getZone() != null) {
|
if (targetCards != null) {
|
||||||
zones.add(c.getZone());
|
for (final CardView c : targetCards) {
|
||||||
playersWithValidTargets.put(c.getController(), c);
|
if (c.getZone() != null) {
|
||||||
|
zones.add(c.getZone());
|
||||||
|
playersWithValidTargets.put(c.getController(), c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (zones.isEmpty() || playersWithValidTargets.isEmpty()) { return; }
|
if (zones.isEmpty() || playersWithValidTargets.isEmpty()) { return; }
|
||||||
|
|||||||
Reference in New Issue
Block a user