From 98bef4917a73fd8c3034a2d005cbf95b1f35d3f0 Mon Sep 17 00:00:00 2001 From: d3agle Date: Sat, 25 Jul 2015 03:53:00 -0500 Subject: [PATCH] PacketHandler fix For some reason, killing the Client process on my VM while Remote Desktop was running on my host would cause the Server to crash. A NullReferenceException was thrown @ Line 16 in PacketHandler.cs. Not sure if this is the best fix, but the server is trying to handle a packet after client.Value is nulled --- Server/Core/Packets/PacketHandler.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Server/Core/Packets/PacketHandler.cs b/Server/Core/Packets/PacketHandler.cs index 6b397d06..ce1dd9ce 100644 --- a/Server/Core/Packets/PacketHandler.cs +++ b/Server/Core/Packets/PacketHandler.cs @@ -10,6 +10,9 @@ public static void HandlePacket(Client client, IPacket packet) { var type = packet.GetType(); + if (client.Value == null) + return; + if (!client.Value.IsAuthenticated) { if (type == typeof(ClientPackets.GetAuthenticationResponse))