diff options
author | jani270 <69345714+jani270@users.noreply.github.com> | 2024-01-04 11:14:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-04 11:14:06 +0100 |
commit | 998e57bd7d7c5e2855c434aa9b81a4f82507112f (patch) | |
tree | 0d7254949002487e487f1a0bb2ade20f2871a0ba /src/main | |
parent | 193c0c8acd7dfefadd496b50ce2ecf2ff12a35f7 (diff) | |
download | NotEnoughUpdates-998e57bd7d7c5e2855c434aa9b81a4f82507112f.tar.gz NotEnoughUpdates-998e57bd7d7c5e2855c434aa9b81a4f82507112f.tar.bz2 NotEnoughUpdates-998e57bd7d7c5e2855c434aa9b81a4f82507112f.zip |
Fixed tuningData crash on PV (#993)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/SkyblockProfiles.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/SkyblockProfiles.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/SkyblockProfiles.java index a8fd019c..fc9ec444 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/SkyblockProfiles.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/SkyblockProfiles.java @@ -722,7 +722,11 @@ public class SkyblockProfiles { JsonObject profileJson = getProfileJson(); if (Utils.getElement(profileJson, "accessory_bag_storage.tuning") == null) return null; - JsonObject tuningData = Utils.getElement(profileJson, "accessory_bag_storage.tuning.slot_0").getAsJsonObject(); + JsonObject tuningData = Utils.getElementOrDefault( + profileJson, + "accessory_bag_storage.tuning.slot_0", + new JsonObject() + ).getAsJsonObject(); if (tuningData.entrySet().isEmpty()) return null; tuningInfo = new LinkedHashMap<>(); |