From 8f474b8baf09c7d02449c796c31bc53b0cae7fd1 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Sat, 24 May 2014 23:55:13 -0500 Subject: [PATCH] Fixed http://openeye.openmods.info/crashes/e9ee0132c58b39e5d6b41983e239b77f Fixed http://openeye.openmods.info/crashes/90d72b392a1e968ef7dab98f5a65d1d8 --- block/networking/BlockCableBus.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/block/networking/BlockCableBus.java b/block/networking/BlockCableBus.java index a135bba6..886e2d18 100644 --- a/block/networking/BlockCableBus.java +++ b/block/networking/BlockCableBus.java @@ -277,13 +277,15 @@ public class BlockCableBus extends AEBaseBlock private ICableBusContainer cb(IBlockAccess w, int x, int y, int z) { TileEntity te = w.getTileEntity( x, y, z ); + ICableBusContainer out = null; + if ( te instanceof TileCableBus ) - return ((TileCableBus) te).cb; + out = ((TileCableBus) te).cb; - if ( AppEng.instance.isIntegrationEnabled( "FMP" ) ) - return ((IFMP) AppEng.instance.getIntegration( "FMP" )).getCableContainer( te ); + else if ( AppEng.instance.isIntegrationEnabled( "FMP" ) ) + out = ((IFMP) AppEng.instance.getIntegration( "FMP" )).getCableContainer( te ); - return nullCB; + return out == null ? nullCB : out; } /**