mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Fix null reference exception when loading deck
in sealed or draft deck editor
This commit is contained in:
@@ -88,12 +88,11 @@ public class DeckController<T extends DeckBase> {
|
|||||||
* Load deck from file or clipboard
|
* Load deck from file or clipboard
|
||||||
*/
|
*/
|
||||||
public void loadDeck(Deck deck) {
|
public void loadDeck(Deck deck) {
|
||||||
|
if (view.getCatalogManager().isInfinite()) {
|
||||||
if (deck.getName() == "") {
|
if (deck.getName() == "") {
|
||||||
newModel();
|
newModel();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
if (!view.getCatalogManager().isInfinite()) {
|
|
||||||
CardPool catalogClone = new CardPool(view.getInitialCatalog());
|
CardPool catalogClone = new CardPool(view.getInitialCatalog());
|
||||||
deck = pickFromCatalog(deck, catalogClone);
|
deck = pickFromCatalog(deck, catalogClone);
|
||||||
ItemPool<PaperCard> catalogPool = view.getCatalogManager().getPool();
|
ItemPool<PaperCard> catalogPool = view.getCatalogManager().getPool();
|
||||||
|
|||||||
Reference in New Issue
Block a user