Merge pull request #291 from Flow86/patch-npe

fix NPE if pipe does not exist (null pipe)
This commit is contained in:
CovertJaguar 2012-09-18 17:01:33 -07:00
commit 625fb692b4

View file

@ -164,8 +164,10 @@ public class PipeTransportLiquids extends PipeTransport implements ITankContaine
if (!Utils.checkPipesConnections(container, entity))
return false;
if (entity instanceof TileGenericPipe){
if (!((TileGenericPipe)entity).pipe.inputOpen(o.reverse())){
if (entity instanceof TileGenericPipe) {
Pipe pipe = ((TileGenericPipe) entity).pipe;
if (pipe == null || !pipe.inputOpen(o.reverse())) {
return false;
}
}