From a9f9a2dca926cc2d5e7095e7f90e7e142b517a7f Mon Sep 17 00:00:00 2001 From: boy0001 Date: Tue, 14 Jul 2015 04:36:12 +1000 Subject: [PATCH] Fix comment fetching on null plots --- .../com/intellectualcrafters/plot/database/DBFunc.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/DBFunc.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/DBFunc.java index 22379a1c2..df7da0c27 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/DBFunc.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/DBFunc.java @@ -258,14 +258,14 @@ public class DBFunc { * @param comment */ public static void removeComment(final Plot plot, final PlotComment comment) { - if (plot.temp) { + if (plot != null && plot.temp) { return; } dbManager.removeComment(plot, comment); } public static void clearInbox(final Plot plot, final String inbox) { - if (plot.temp) { + if (plot != null && plot.temp) { return; } dbManager.clearInbox(plot, inbox); @@ -276,7 +276,7 @@ public class DBFunc { * @param comment */ public static void setComment(final Plot plot, final PlotComment comment) { - if (plot.temp) { + if (plot != null && plot.temp) { return; } dbManager.setComment(plot, comment); @@ -286,7 +286,7 @@ public class DBFunc { * @param plot */ public static void getComments(final Plot plot, final String inbox, RunnableVal whenDone) { - if (plot.temp) { + if (plot != null && plot.temp) { return; } dbManager.getComments(plot, inbox, whenDone);