aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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