Fix NPE on startup if you don't have Quest achievements yet.

This commit is contained in:
elcnesh
2014-06-09 11:57:42 +00:00
parent 29fc7a7d78
commit 9807361a39

View File

@@ -155,7 +155,8 @@ public class QuestController {
if (draftDecks == null) {
draftDecks = new QuestDeckGroupMap(new HashMap<String, DeckGroup>());
}
if (this.getAchievements().getCurrentDraftIndex() == -1 || this.getAchievements().getCurrentDraft() == null) {
final QuestAchievements achievements = this.getAchievements();
if (achievements != null && (achievements.getCurrentDraftIndex() == -1 || achievements.getCurrentDraft() == null)) {
draftDecks.delete(QuestEventDraft.DECK_NAME);
}
return draftDecks;