From 0cb6d7ca8416685c17dbfbea9ec81ef8fa24ae21 Mon Sep 17 00:00:00 2001 From: graywolf336 Date: Mon, 9 Feb 2015 23:38:30 -0600 Subject: [PATCH] Don't get a location from a null value, fixes #46 --- src/main/java/com/graywolf336/jail/beans/Cell.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/graywolf336/jail/beans/Cell.java b/src/main/java/com/graywolf336/jail/beans/Cell.java index 8112399..cd08e61 100644 --- a/src/main/java/com/graywolf336/jail/beans/Cell.java +++ b/src/main/java/com/graywolf336/jail/beans/Cell.java @@ -114,7 +114,7 @@ public class Cell { * @return The location of the chest, null if none. */ public Location getChestLocation() { - return this.chest.getLocation(); + return this.chest == null ? null : this.chest.getLocation(); } /**