Fix null reference exception when loading deck

in sealed or draft deck editor
This commit is contained in:
NikolayHD
2019-08-10 03:35:51 +03:00
parent 6f6cb9296b
commit 3c6d45ff0c

View File

@@ -88,12 +88,11 @@ public class DeckController<T extends DeckBase> {
* Load deck from file or clipboard
*/
public void loadDeck(Deck deck) {
if (deck.getName() == "") {
newModel();
}
if (!view.getCatalogManager().isInfinite()) {
if (view.getCatalogManager().isInfinite()) {
if (deck.getName() == "") {
newModel();
}
} else {
CardPool catalogClone = new CardPool(view.getInitialCatalog());
deck = pickFromCatalog(deck, catalogClone);
ItemPool<PaperCard> catalogPool = view.getCatalogManager().getPool();