mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- NPE prevention in LobbyScreen on mobile Forge when trying to choose a variant without having a constructed deck.
This commit is contained in:
@@ -556,6 +556,7 @@ public abstract class LobbyScreen extends LaunchScreen implements ILobbyView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Deck playerDeck = deck;
|
Deck playerDeck = deck;
|
||||||
|
if (deck != null) {
|
||||||
if (hasVariant(GameType.Archenemy) || hasVariant(GameType.ArchenemyRumble)) {
|
if (hasVariant(GameType.Archenemy) || hasVariant(GameType.ArchenemyRumble)) {
|
||||||
if (playerDeck == deck) {
|
if (playerDeck == deck) {
|
||||||
playerDeck = new Deck(deck); //create copy that can be modified
|
playerDeck = new Deck(deck); //create copy that can be modified
|
||||||
@@ -576,6 +577,7 @@ public abstract class LobbyScreen extends LaunchScreen implements ILobbyView {
|
|||||||
avatarPool.add(playerPanel.getVanguardAvatar());
|
avatarPool.add(playerPanel.getVanguardAvatar());
|
||||||
playerDeck.putSection(DeckSection.Avatar, avatarPool);
|
playerDeck.putSection(DeckSection.Avatar, avatarPool);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
decks[playerIndex] = playerDeck;
|
decks[playerIndex] = playerDeck;
|
||||||
if (playerChangeListener != null) {
|
if (playerChangeListener != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user