fix crash when showing uninitialized zone

This commit is contained in:
Peter F. Patel-Schneider
2019-02-19 08:10:09 -05:00
parent 2b0fc5a00a
commit 6fcb996938

View File

@@ -123,11 +123,16 @@ public class FloatingZone extends FloatingCardArea {
};
protected Iterable<CardView> getCards() {
Iterable<CardView> zoneCards = player.getCards(zone);
if ( zoneCards != null ) {
cardList = new FCollection<CardView>(player.getCards(zone));
if ( sortedByName ) {
Collections.sort(cardList, comp);
}
return cardList;
} else {
return null;
}
}
private FloatingZone(final CMatchUI matchUI, final PlayerView player0, final ZoneType zone0) {