aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2023-06-10 18:08:39 +1000
committerGitHub <noreply@github.com>2023-06-10 10:08:39 +0200
commitbbfd03f66a5295d2381cf782b5992416d49fb137 (patch)
tree194cfa4446b9f22a3df67aa3d3e36c1927893799 /src/main/java
parent9940029b796d62f5b42aaa400b129c9f7f16b0d7 (diff)
downloadskyhanni-bbfd03f66a5295d2381cf782b5992416d49fb137.tar.gz
skyhanni-bbfd03f66a5295d2381cf782b5992416d49fb137.tar.bz2
skyhanni-bbfd03f66a5295d2381cf782b5992416d49fb137.zip
fix rare crash (#226)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
index 9127d7af6..5ed2fd757 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
@@ -364,7 +364,7 @@ class GardenVisitorFeatures {
if (totalPrice == 0.0) {
totalPrice = price
val multiplier = NEUItems.getMultiplier(internalName)
- val rawName = NEUItems.getItemStack(multiplier.first).name?.removeColor() ?: continue
+ val rawName = NEUItems.getItemStackOrNull(multiplier.first)?.name?.removeColor() ?: continue
getByNameOrNull(rawName)?.let {
val cropAmount = multiplier.second.toLong() * amount
val formattedAmount = LorenzUtils.formatInteger(cropAmount)