From bbfd03f66a5295d2381cf782b5992416d49fb137 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Sat, 10 Jun 2023 18:08:39 +1000 Subject: fix rare crash (#226) --- .../hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') 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) -- cgit