From d5572d881082259c48dcdbe02d4af3a29b781c46 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Wed, 28 Jun 2023 06:23:01 +1000 Subject: Fix pv NPE if no argument (#743) fixed npe in /pv with no aguments --- .../moulberry/notenoughupdates/profileviewer/ProfileViewerUtils.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewerUtils.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewerUtils.java index 030a9f19..8a04e0ff 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewerUtils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewerUtils.java @@ -206,6 +206,7 @@ public class ProfileViewerUtils { } public static void saveSearch(String username) { + if (username == null) return; String nameLower = username.toLowerCase(); if (nameLower.equals(Minecraft.getMinecraft().thePlayer.getName().toLowerCase())) return; List previousProfileSearches = NotEnoughUpdates.INSTANCE.config.hidden.previousProfileSearches; -- cgit