From d8f55006ffbc06fe311213c8dd510a236f14cdff Mon Sep 17 00:00:00 2001 From: Myles Date: Sat, 27 May 2017 20:41:00 +0100 Subject: [PATCH] =?UTF-8?q?Ensure=20connection=20isn=E2=80=99t=20null=20(r?= =?UTF-8?q?eloads=20etc),=20fixes=20#674?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../us/myles/ViaVersion/commands/defaultsubs/PPSSubCmd.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/us/myles/ViaVersion/commands/defaultsubs/PPSSubCmd.java b/common/src/main/java/us/myles/ViaVersion/commands/defaultsubs/PPSSubCmd.java index 69890b3b5..90a090117 100644 --- a/common/src/main/java/us/myles/ViaVersion/commands/defaultsubs/PPSSubCmd.java +++ b/common/src/main/java/us/myles/ViaVersion/commands/defaultsubs/PPSSubCmd.java @@ -36,7 +36,7 @@ public class PPSSubCmd extends ViaSubCommand { if (!playerVersions.containsKey(playerVersion)) playerVersions.put(playerVersion, new HashSet()); UserConnection uc = Via.getManager().getConnection(p.getUUID()); - if (uc.getPacketsPerSecond() > -1) { + if (uc != null && uc.getPacketsPerSecond() > -1) { playerVersions.get(playerVersion).add(p.getName() + " (" + uc.getPacketsPerSecond() + " PPS)"); totalPackets += uc.getPacketsPerSecond(); if (uc.getPacketsPerSecond() > max) {