From a4c72d234c47a0d685ef872568c48ffd7865aee9 Mon Sep 17 00:00:00 2001 From: nea Date: Sat, 9 Sep 2023 20:51:58 +0200 Subject: Fix NPE --- .../moulberry/notenoughupdates/profileviewer/bestiary/BestiaryData.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryData.kt b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryData.kt index ff2d2288..4829aca1 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryData.kt +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryData.kt @@ -93,7 +93,7 @@ object BestiaryData { val parsedCategories = mutableListOf() val apiKills = profileInfo.getAsJsonObject("bestiary")!!.getAsJsonObject("kills") ?: return mutableListOf() - val apiDeaths = profileInfo.getAsJsonObject("bestiary").getAsJsonObject("deaths") + val apiDeaths = profileInfo.getAsJsonObject("bestiary").getAsJsonObject("deaths") ?: return mutableListOf() val killsMap: HashMap = HashMap() for (entry in apiKills.entrySet()) { killsMap[entry.key] = entry.value.asInt -- cgit