diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-06-04 12:41:51 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-06-04 12:41:51 +0200 |
commit | 0de6356eba9ac00b7a32aa7ab486d21e13fd2d08 (patch) | |
tree | d0bfb617922b10bfb429a5016e634fecb5614d4f /src/main/java/at/hannibal2/skyhanni | |
parent | 0e8452bc45985ae552d8e3ca847d9a24d3dc24c2 (diff) | |
download | skyhanni-0de6356eba9ac00b7a32aa7ab486d21e13fd2d08.tar.gz skyhanni-0de6356eba9ac00b7a32aa7ab486d21e13fd2d08.tar.bz2 skyhanni-0de6356eba9ac00b7a32aa7ab486d21e13fd2d08.zip |
Fixed NPE in pet discord status
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt | 2 |
1 files changed, 1 insertions, 1 deletions
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<String>?) 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" |