aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
index 227d52d0..1ae62b6c 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
@@ -3910,7 +3910,7 @@ public class GuiProfileViewer extends GuiScreen {
private String getTimeSinceString(JsonObject profileInfo, String path) {
JsonElement lastSaveElement = Utils.getElement(profileInfo, path);
- if (lastSaveElement.isJsonPrimitive()) {
+ if (lastSaveElement != null && lastSaveElement.isJsonPrimitive()) {
Instant lastSave = Instant.ofEpochMilli(lastSaveElement.getAsLong());
LocalDateTime lastSaveTime = LocalDateTime.ofInstant(lastSave, TimeZone.getDefault().toZoneId());