aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-08 10:12:54 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-08 10:12:54 +0200
commit261e4012d6f7e129f7311f270147caddcc20a22a (patch)
treea3ab652413d194fbb1896a46d18362a55ff9d71a /src/main/java/at/hannibal2/skyhanni
parentf3d5d4dcb6f9101afc69950a5d45af5dd3da10c9 (diff)
downloadskyhanni-261e4012d6f7e129f7311f270147caddcc20a22a.tar.gz
skyhanni-261e4012d6f7e129f7311f270147caddcc20a22a.tar.bz2
skyhanni-261e4012d6f7e129f7311f270147caddcc20a22a.zip
Fixed NPE in QuickCraftFeatures
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt
index 01d5dfe85..d2155a416 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt
@@ -45,8 +45,9 @@ class QuickCraftFeatures {
for (slot in chest.inventorySlots) {
if (slot == null) continue
if (slot.slotNumber !in quickCraftSlots) continue
- val stack = slot.stack
- if (stack.name == "§cQuick Crafting Slot") continue
+ val stack = slot.stack ?: continue
+ val name = stack.name ?: continue
+ if (name == "§cQuick Crafting Slot") continue
if (needsQuickCraftConfirmation(stack)) {
val color = LorenzColor.DARK_GRAY.addOpacity(180)
stack.background = color.rgb