From cbb8cbc0b0884a79bfd32346d05d20249716b50f Mon Sep 17 00:00:00 2001 From: "Aidan C. Brady" Date: Sun, 5 Apr 2015 13:02:57 -0400 Subject: [PATCH] Added a null check - this may fix some other issues --- src/main/java/mekanism/client/ThreadSparkle.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/java/mekanism/client/ThreadSparkle.java b/src/main/java/mekanism/client/ThreadSparkle.java index 27fa9d251..b19cf707e 100644 --- a/src/main/java/mekanism/client/ThreadSparkle.java +++ b/src/main/java/mekanism/client/ThreadSparkle.java @@ -83,11 +83,16 @@ public class ThreadSparkle extends Thread for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { - TileEntity tile = Coord4D.get(tileEntity).getFromSide(side).getTileEntity(pointer.getWorldObj()); - - if(tile != null && isNode(tile) && !iteratedNodes.contains(tile)) + Coord4D coord = Coord4D.get(tileEntity).getFromSide(side); + + if(coord.exists(pointer.getWorldObj())) { - loop(tile); + TileEntity tile = coord.getTileEntity(pointer.getWorldObj()); + + if(tile != null && isNode(tile) && !iteratedNodes.contains(tile)) + { + loop(tile); + } } } }