From 9c174b3e3e36d01dd22a1096afc4767dc55172e7 Mon Sep 17 00:00:00 2001 From: Sol Date: Mon, 8 Oct 2012 23:27:45 +0000 Subject: [PATCH] - Temporary fix so QuestController is instantiated when it's first requested, instead of when FModel is, since that's too early --- src/main/java/forge/model/FModel.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/forge/model/FModel.java b/src/main/java/forge/model/FModel.java index f16111bdc27..f41505f5b87 100644 --- a/src/main/java/forge/model/FModel.java +++ b/src/main/java/forge/model/FModel.java @@ -85,7 +85,7 @@ public enum FModel { private final FMatchState matchState; private GauntletData gauntletData; - private final QuestController quest; + private QuestController quest = null; private final EditionCollection editions; private final FormatCollection formats; @@ -147,7 +147,6 @@ public enum FModel { this.blocks = new StorageView(new CardBlock.Reader("res/blockdata/blocks.txt", editions)); this.fantasyBlocks = new StorageView(new CardBlock.Reader("res/blockdata/fantasyblocks.txt", editions)); - this.quest = new QuestController(); // TODO - there's got to be a better place for this...oblivion? Preferences.DEV_MODE = this.preferences.getPrefBoolean(FPref.DEV_MODE_ENABLED); @@ -164,6 +163,9 @@ public enum FModel { } public final QuestController getQuest() { + if (quest == null) { + this.quest = new QuestController(); + } return quest; }