From b82c11e867f923ddd309775394a6a23ef701e09c Mon Sep 17 00:00:00 2001 From: jani270 <69345714+jani270@users.noreply.github.com> Date: Sat, 25 Nov 2023 14:03:16 +0100 Subject: Hopefully fixed 2 kuudra crashes (#950) --- .../notenoughupdates/profileviewer/CrimsonIslePage.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java index a752f522..4053b987 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java @@ -160,6 +160,17 @@ public class CrimsonIslePage extends GuiProfileViewerPage { JsonObject kuudraCompletedTiers = data.getAsJsonObject("kuudra_completed_tiers"); + if (kuudraCompletedTiers == null) { + Utils.renderAlignedString( + EnumChatFormatting.RED + "No kuudra stats found!", + " ", + guiLeft + 15, + guiTop + 101, + 130 + ); + return; + } + RenderHelper.enableGUIStandardItemLighting(); for (int i = 0; i < 5; i++) { @@ -301,7 +312,7 @@ public class CrimsonIslePage extends GuiProfileViewerPage { JsonObject lastMatriarchAttempt = data.getAsJsonObject("matriarch"); - if (!lastMatriarchAttempt.entrySet().isEmpty()) { + if (lastMatriarchAttempt != null && !lastMatriarchAttempt.entrySet().isEmpty()) { Utils.renderAlignedString( EnumChatFormatting.GOLD + "Heavy Pearls Acquired: ", EnumChatFormatting.WHITE + lastMatriarchAttempt.get("pearls_collected").getAsString(), -- cgit