summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWesley Wolfe <weswolf@aol.com>2012-03-27 09:42:34 -0500
committerWarren Loo <evilseph@gmail.com>2012-03-27 20:38:03 -0400
commit7ce3a4dbcc727f50989879a951eb673b7535e733 (patch)
tree1742bef29868c96fcfc0d219dbf66518c95b19e7
parent979d54e78db9eb882ce150eb159a0814f35fed15 (diff)
downloadbukkit-7ce3a4dbcc727f50989879a951eb673b7535e733.tar
bukkit-7ce3a4dbcc727f50989879a951eb673b7535e733.tar.gz
bukkit-7ce3a4dbcc727f50989879a951eb673b7535e733.tar.lz
bukkit-7ce3a4dbcc727f50989879a951eb673b7535e733.tar.xz
bukkit-7ce3a4dbcc727f50989879a951eb673b7535e733.zip
[Bleeding] Add null check to getFacing(); Fixes BUKKIT-1249
-rw-r--r--src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java b/src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java
index bc3a4ff8..b88c3f9b 100644
--- a/src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java
+++ b/src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java
@@ -35,7 +35,8 @@ public abstract class SimpleAttachableMaterialData extends MaterialData implemen
}
public BlockFace getFacing() {
- return getAttachedFace().getOppositeFace();
+ BlockFace attachedFace = getAttachedFace();
+ return attachedFace == null ? null : attachedFace.getOppositeFace();
}
@Override