aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/StoryTaskLevel.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/StoryTaskLevel.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/StoryTaskLevel.java
index 1cda3e01..a55c8cff 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/StoryTaskLevel.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/StoryTaskLevel.java
@@ -46,9 +46,9 @@ public class StoryTaskLevel extends GuiTaskLevel {
int sbXpStory = 0;
for (JsonElement storyTaskName : storyTaskNames) {
String value = storyTaskName.getAsString();
- if (objectives.has(value)) {
+ if (objectives != null && objectives.has(value)) {
JsonObject jsonObject = objectives.get(value).getAsJsonObject();
- if (jsonObject.has("status") && jsonObject.get("status").getAsString().equals("COMPLETE")) {
+ if (jsonObject != null && jsonObject.has("status") && jsonObject.get("status").getAsString().equals("COMPLETE")) {
sbXpStory += storyTaskXp;
}
}