Skip to content

Commit 2c8189a

Browse files
authored
Fix edge case when server sends a useless packet (#679)
1 parent 48c9e45 commit 2c8189a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

common/src/main/java/com/viaversion/viarewind/protocol/v1_8to1_7_6_10/storage/GameProfileStorage.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ public List<GameProfile> getAllWithPrefix(String prefix, boolean ignoreCase) {
7878

7979
public GameProfile remove(UUID uuid) {
8080
GameProfile removedProfile = properties.remove(uuid);
81-
nameToProfile.get(removedProfile.name).remove(removedProfile);
81+
if (removedProfile != null) {
82+
nameToProfile.get(removedProfile.name).remove(removedProfile);
83+
}
8284
return removedProfile;
8385
}
8486

0 commit comments

Comments
 (0)