From 7f3a7a0ac0aa6d346686ad91e6cb4daca622e950 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Wed, 27 Aug 2014 20:12:31 -0500 Subject: [PATCH 1/2] Fixed Bug: #0984 - Crash while crafting --- me/cluster/implementations/CraftingCPUCluster.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/me/cluster/implementations/CraftingCPUCluster.java b/me/cluster/implementations/CraftingCPUCluster.java index 8b2c5e1b8..67fd53fab 100644 --- a/me/cluster/implementations/CraftingCPUCluster.java +++ b/me/cluster/implementations/CraftingCPUCluster.java @@ -1071,7 +1071,15 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU public boolean isActive() { - return getCore().getActionableNode().isActive(); + TileCraftingTile core = getCore(); + if ( core == null ) + return false; + + IGridNode node = core.getActionableNode(); + if ( node == null ) + return false; + + return node.isActive(); } public boolean isMaking(IAEItemStack what) From 4f9daaad08ecc8e940ec0f3fc35b97bf0ba1adc2 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Wed, 27 Aug 2014 22:52:34 -0500 Subject: [PATCH 2/2] Fix NPE in postCraftingStatusChange --- me/cluster/implementations/CraftingCPUCluster.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/me/cluster/implementations/CraftingCPUCluster.java b/me/cluster/implementations/CraftingCPUCluster.java index 67fd53fab..1488a3c20 100644 --- a/me/cluster/implementations/CraftingCPUCluster.java +++ b/me/cluster/implementations/CraftingCPUCluster.java @@ -276,6 +276,9 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU public void postCraftingStatusChange(IAEItemStack diff) { + if ( getGrid() == null ) + return; + CraftingGridCache sg = getGrid().getCache( ICraftingGrid.class ); if ( sg.interestManager.containsKey( diff ) )