From f896f2df6523110214aab1f4975b8bc75c942dbc Mon Sep 17 00:00:00 2001 From: Joe0 Date: Mon, 31 Oct 2011 15:26:15 -0500 Subject: [PATCH] Fix for NPE caused by blocking connections closes #19 --- .../msc/gs/connection/filter/ConnectionFilter.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GameServer/src/org/moparscape/msc/gs/connection/filter/ConnectionFilter.java b/GameServer/src/org/moparscape/msc/gs/connection/filter/ConnectionFilter.java index ab144c7..a655ffa 100644 --- a/GameServer/src/org/moparscape/msc/gs/connection/filter/ConnectionFilter.java +++ b/GameServer/src/org/moparscape/msc/gs/connection/filter/ConnectionFilter.java @@ -72,6 +72,11 @@ public class ConnectionFilter extends BlacklistFilter { final Integer val; synchronized (connections) { val = connections.get(host); + + // Prevents NPE caused by blocking connections + if (val == null) { + return; + } if (val == 1) { connections.remove(host); } else {