From ce23ad561581284ec5705086d6b67b4f1a6d8615 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sun, 5 Jun 2016 18:07:41 +1000 Subject: [PATCH] Fix NPE --- Core/src/main/java/com/intellectualcrafters/plot/PS.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/PS.java b/Core/src/main/java/com/intellectualcrafters/plot/PS.java index 433d9433c..9510e4d17 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/PS.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/PS.java @@ -666,8 +666,8 @@ public class PS { * @see #removePlotArea(PlotArea) To remove the reference */ public void addPlotArea(PlotArea plotArea) { - HashMap plots = this.plots_tmp.remove(plotArea.toString()); - if (plots == null) { + HashMap plots; + if (plots_tmp == null || (plots = plots_tmp.remove(plotArea.toString())) == null) { if (plotArea.TYPE == 2) { plots = this.plots_tmp.get(plotArea.worldname); if (plots != null) { @@ -687,8 +687,8 @@ public class PS { entry.setArea(plotArea); } } - Set clusters = this.clusters_tmp.remove(plotArea.toString()); - if (clusters == null) { + Set clusters; + if (clusters_tmp == null || (clusters = clusters_tmp.remove(plotArea.toString())) == null) { if (plotArea.TYPE == 2) { clusters = this.clusters_tmp.get(plotArea.worldname); if (clusters != null) {