From dc66fe1509bde7dc3d7c786ff6fdb624c9150f8c Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 3 Mar 2023 17:59:05 +0100 Subject: Fixed NPE --- .../at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt index d9de3b11d..2a2d9f270 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt @@ -59,7 +59,8 @@ class GardenVisitorFeatures { if (!config.visitorNeedsDisplay && !config.visitorHighlight) return - val visitor = visitors[npcItem.name!!]!! + val name = npcItem.name ?: return + val visitor = visitors[name]!! visitor.entityId = lastClickedNpc for (line in offerItem.getLore()) { if (line == "ยง7Items Required:") continue -- cgit