From 955a78b8fd80337698f6bad9006952408c1ab451 Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Fri, 29 Apr 2011 03:14:16 -0400 Subject: [PATCH] Handle NPE in ThreadLoginVerifier that occurs when trying to continue using a closed socket. --- src/main/java/net/minecraft/server/ThreadLoginVerifier.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java index 9bf70e0403..b781583c23 100644 --- a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java +++ b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java @@ -36,6 +36,10 @@ class ThreadLoginVerifier extends Thread { bufferedreader.close(); if (s1.equals("YES")) { // CraftBukkit start + if (this.netLoginHandler.getSocket() == null) { + return; + } + PlayerPreLoginEvent event = new PlayerPreLoginEvent(this.loginPacket.name, this.netLoginHandler.getSocket().getInetAddress()); server.getPluginManager().callEvent(event);