Map.remove() can return Null.

This commit is contained in:
Sean Porter 2014-01-09 22:52:25 -08:00
parent 2e94eecda0
commit cc524bb2ab

View File

@ -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();
}
}