From affaa482396351a03d8f5034379bf2144ada9105 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Tue, 14 May 2024 21:53:03 +1000 Subject: Fix null recent searches crashing in /pv (#1171) --- .../moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java index 08340f23..6194b2dd 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -837,6 +837,7 @@ public class GuiProfileViewer extends GuiScreen { } } + previousProfileSearches.removeIf(Objects::isNull); for (int i = 0; i < previousProfileSearches.size(); i++) { if (mouseX > x && mouseX < x + 28) { if (mouseY > y + 28 * (i + 1) && mouseY < y + 28 * (i + 2)) { -- cgit