diff options
author | Keebler408 <85420839+Keebler408@users.noreply.github.com> | 2021-12-20 15:03:51 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-20 22:03:51 +0100 |
commit | c908066d28a5d77aea8b89ea620be3ad806ba064 (patch) | |
tree | 87dcecdb38698359249e297da6cfc90dce08f2a6 /src/main/java | |
parent | 4e06a3b0ff9389ef75ee4e407ce4262e1b050ffc (diff) | |
download | NotEnoughUpdates-c908066d28a5d77aea8b89ea620be3ad806ba064.tar.gz NotEnoughUpdates-c908066d28a5d77aea8b89ea620be3ad806ba064.tar.bz2 NotEnoughUpdates-c908066d28a5d77aea8b89ea620be3ad806ba064.zip |
Fix crash in profile viewer (#34)
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java | 2 |
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()); |