From 0de6356eba9ac00b7a32aa7ab486d21e13fd2d08 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 4 Jun 2023 12:41:51 +0200 Subject: Fixed NPE in pet discord status --- .../at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt index f26f3bcab..9cf02c07d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt @@ -185,7 +185,7 @@ enum class DiscordStatus(private val displayMessageSupplier: Supplier?) ProfileStorageData.profileSpecific?.currentPet?.let { val colorCode = it.substring(1..2).first() val petName = it.substring(2) - val petLevel = getCurrentPet().petLevel.currentLevel + val petLevel = getCurrentPet()?.petLevel?.currentLevel ?: "?" "[Lvl $petLevel] ${colorCodeToRarity(colorCode)} $petName" } ?: "No pet equipped" -- cgit