mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Merge branch 'gauntletfix' into 'master'
Fix some more NPE related to gauntlets See merge request core-developers/forge!5583
This commit is contained in:
@@ -122,8 +122,8 @@ public enum CSubmenuGauntletBuild implements ICDoc {
|
||||
}
|
||||
|
||||
private void addDeck() {
|
||||
final Deck deckToAdd = view.getLstLeft().getPlayer().getDeck();
|
||||
if ( null == deckToAdd ) {
|
||||
final Deck deckToAdd = view.getLstLeft().getPlayer() != null ? view.getLstLeft().getPlayer().getDeck() : null;
|
||||
if (null == deckToAdd) {
|
||||
return;
|
||||
}
|
||||
workingDecks.add(deckToAdd);
|
||||
@@ -145,7 +145,7 @@ public enum CSubmenuGauntletBuild implements ICDoc {
|
||||
private void deckUp() {
|
||||
final int oldIndex = view.getLstRight().getSelectedIndex();
|
||||
|
||||
if (oldIndex == 0) { return; }
|
||||
if (oldIndex <= 0) { return; }
|
||||
|
||||
final Deck movingDeck = workingDecks.remove(oldIndex);
|
||||
workingDecks.add(oldIndex - 1, movingDeck);
|
||||
|
||||
Reference in New Issue
Block a user