aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-28 18:30:05 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-28 18:30:05 +0200
commit825dc7cda2d4b1b6d500a075151cb37432d32566 (patch)
tree6f29385a28faa3dac6f0028d8845ac9c304faad5
parentace3681e98df11c8b54463a1c58bb921d9328f5e (diff)
downloadskyhanni-825dc7cda2d4b1b6d500a075151cb37432d32566.tar.gz
skyhanni-825dc7cda2d4b1b6d500a075151cb37432d32566.tar.bz2
skyhanni-825dc7cda2d4b1b6d500a075151cb37432d32566.zip
Fixed crash in visitor list item preview when the repo data is incomplete
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt7
1 files changed, 6 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 ecb3c541d..6483f44cc 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt
@@ -144,7 +144,12 @@ class GardenVisitorFeatures {
list.add(" §7- $displayName")
if (config.visitorItemPreview) {
- val items = GardenVisitorColorNames.visitorItems[visitor.removeColor()]!!
+ val items = GardenVisitorColorNames.visitorItems[visitor.removeColor()]
+ if (items == null) {
+ LorenzUtils.debug("Visitor '$visitor' has no items in repo!")
+ list.add(" §7(§c?§7)")
+ continue
+ }
list.add(" ")
if (items.isEmpty()) {
list.add("§7(§fAny§7)")