aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-03 17:59:05 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-03 17:59:05 +0100
commitdc66fe1509bde7dc3d7c786ff6fdb624c9150f8c (patch)
tree5a058ce2c8da2089f60c0c932405533d9ea77bb1
parent7c0b053b188fee0c1f74b24c441293f6a7d685e4 (diff)
downloadskyhanni-dc66fe1509bde7dc3d7c786ff6fdb624c9150f8c.tar.gz
skyhanni-dc66fe1509bde7dc3d7c786ff6fdb624c9150f8c.tar.bz2
skyhanni-dc66fe1509bde7dc3d7c786ff6fdb624c9150f8c.zip
Fixed NPE
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt3
1 files changed, 2 insertions, 1 deletions
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