aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjani270 <69345714+jani270@users.noreply.github.com>2024-03-27 19:56:19 +0100
committerGitHub <noreply@github.com>2024-03-27 19:56:19 +0100
commit935bb393cf5928eab5f7131c385a34affc79683f (patch)
tree29d0f46251c76d5683f6ad1d001ea66cb7eb7fee
parent047893c2326c97a4df9267115ab9f37168b7ab93 (diff)
downloadNotEnoughUpdates-935bb393cf5928eab5f7131c385a34affc79683f.tar.gz
NotEnoughUpdates-935bb393cf5928eab5f7131c385a34affc79683f.tar.bz2
NotEnoughUpdates-935bb393cf5928eab5f7131c385a34affc79683f.zip
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.
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java4
1 files changed, 2 insertions, 2 deletions
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);
}