aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2023-06-28 06:23:01 +1000
committerGitHub <noreply@github.com>2023-06-27 22:23:01 +0200
commitd5572d881082259c48dcdbe02d4af3a29b781c46 (patch)
tree71e1975daec44297d526e8368d0d040e63d17f1f /src/main/java/io
parent838913f0d6e9f0b4f4cd2d5a2d59419fb5cbce66 (diff)
downloadNotEnoughUpdates-d5572d881082259c48dcdbe02d4af3a29b781c46.tar.gz
NotEnoughUpdates-d5572d881082259c48dcdbe02d4af3a29b781c46.tar.bz2
NotEnoughUpdates-d5572d881082259c48dcdbe02d4af3a29b781c46.zip
Fix pv NPE if no argument (#743)
fixed npe in /pv with no aguments
Diffstat (limited to 'src/main/java/io')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewerUtils.java1
1 files changed, 1 insertions, 0 deletions
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<String> previousProfileSearches = NotEnoughUpdates.INSTANCE.config.hidden.previousProfileSearches;