From c70b05e234e776a0ae4a2c0b0fafa4a3e2e1e4c8 Mon Sep 17 00:00:00 2001 From: HappyPikachu Date: Sun, 17 Dec 2017 22:21:53 -0500 Subject: [PATCH] Fix potential NPE when loading custom modules by leNicDev, see #183 --- src/main/java/me/blackvein/quests/Quester.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/me/blackvein/quests/Quester.java b/src/main/java/me/blackvein/quests/Quester.java index f3d88569e..30b895f63 100644 --- a/src/main/java/me/blackvein/quests/Quester.java +++ b/src/main/java/me/blackvein/quests/Quester.java @@ -669,6 +669,9 @@ public class Quester { } public boolean hasCustomObjective(Quest quest, String s) { + if (getQuestData(quest) == null) { + return false; + } if (getQuestData(quest).customObjectiveCounts.containsKey(s)) { int count = getQuestData(quest).customObjectiveCounts.get(s); int index = -1;