From cc524bb2ab069f446cdfaebc10b2c83699858812 Mon Sep 17 00:00:00 2001 From: Sean Porter Date: Thu, 9 Jan 2014 22:52:25 -0800 Subject: [PATCH] Map.remove() can return Null. --- .../com/gmail/nossr50/util/scoreboards/ScoreboardManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java index 949f39552..f2668c24e 100644 --- a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java +++ b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java @@ -154,7 +154,7 @@ public class ScoreboardManager { public static void teardownPlayer(Player player) { ScoreboardWrapper wrapper = PLAYER_SCOREBOARDS.remove(player.getName()); - if (wrapper.revertTask != null) { + if (wrapper != null && wrapper.revertTask != null) { wrapper.revertTask.cancel(); } }