Merge pull request #291 from Flow86/patch-npe
fix NPE if pipe does not exist (null pipe)
This commit is contained in:
commit
625fb692b4
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue