From 935bb393cf5928eab5f7131c385a34affc79683f Mon Sep 17 00:00:00 2001 From: jani270 <69345714+jani270@users.noreply.github.com> Date: Wed, 27 Mar 2024 19:56:19 +0100 Subject: Fix Fairy Soul Waypoints not showing found message when no waypoints present (#1069) Fix Fairy Soul Waypoints not showing found message when no waypoints present. --- .../io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java index a1bf34a3..52ce46a1 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java @@ -198,7 +198,7 @@ public class FairySouls { } public void markClosestSoulFound() { - if (!trackSouls) return; + if (!trackSouls || allSoulsInCurrentLocation == null || allSoulsInCurrentLocation.isEmpty()) return; int closestIndex = -1; double closestDistSq = 10 * 10; for (int i = 0; i < allSoulsInCurrentLocation.size(); i++) { @@ -211,7 +211,7 @@ public class FairySouls { closestIndex = i; } } - if (closestIndex != -1) { + if (closestIndex != -1 && foundSoulsInLocation != null) { foundSoulsInLocation.add(closestIndex); refreshMissingSoulInfo(true); } -- cgit