From eb010094ca32ff570f7377429586713e217bb705 Mon Sep 17 00:00:00 2001 From: mezz Date: Sun, 25 Jan 2015 18:26:29 -0800 Subject: [PATCH] Fix crash from missing block when a plugin mod is uninstalled (cherry picked from commit 5a7bd9f57a69e8fda418c8f95ae65d8aa057ec12) --- src/main/java/forestry/core/gadgets/BlockBase.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/forestry/core/gadgets/BlockBase.java b/src/main/java/forestry/core/gadgets/BlockBase.java index 562d88585..09b81adc6 100755 --- a/src/main/java/forestry/core/gadgets/BlockBase.java +++ b/src/main/java/forestry/core/gadgets/BlockBase.java @@ -136,7 +136,8 @@ public class BlockBase extends BlockForestry { /* INTERACTION */ @Override public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) { - return getDefinition(world, x, y, z).isSolidOnSide(world, x, y, z, side.ordinal()); + MachineDefinition definition = getDefinition(world, x, y, z); + return definition != null && definition.isSolidOnSide(world, x, y, z, side.ordinal()); } @Override