Fix for broken variants with new android multiplayer code

This commit is contained in:
austinio7116
2018-03-19 12:52:49 +00:00
committed by maustin
parent 35245d5268
commit 94e255b198
2 changed files with 6 additions and 3 deletions

View File

@@ -815,6 +815,10 @@ public class FDeckChooser extends FScreen {
/*if(selectedDeckType.equals(DeckType.STANDARD_CARDGEN_DECK)){
return DeckgenUtil.buildCardGenDeck(lstDecks.getSelectedItem().getName());
}*/
//ensure a deck is selected first
if(lstDecks.getSelectedIndex() == -1){
lstDecks.setSelectedIndex(0);
}
DeckProxy proxy = lstDecks.getSelectedItem();
if (proxy == null) { return null; }
return proxy.getDeck();