aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-12 04:34:18 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-12 04:34:18 +0200
commit8d96a1a79f9543a8d243b662cc347c69a78f6e85 (patch)
treee3b8876c4bfde422a3f78e01f7f61d53087a5e43 /src/main
parente3f8ef1c7efe1e4f16aa960756ef1297d10192fa (diff)
downloadskyhanni-8d96a1a79f9543a8d243b662cc347c69a78f6e85.tar.gz
skyhanni-8d96a1a79f9543a8d243b662cc347c69a78f6e85.tar.bz2
skyhanni-8d96a1a79f9543a8d243b662cc347c69a78f6e85.zip
Fixed NPE crash
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
index 8a882226d..418b22960 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
@@ -54,7 +54,7 @@ class GardenAPI {
private fun checkItemInHand() {
val toolItem = Minecraft.getMinecraft().thePlayer.heldItem
- val crop = toolItem.getCropType()
+ val crop = toolItem?.getCropType()
val newTool = getToolInHand(toolItem, crop)
if (toolInHand != newTool) {
toolInHand = newTool