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))
|
if (!Utils.checkPipesConnections(container, entity))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (entity instanceof TileGenericPipe){
|
if (entity instanceof TileGenericPipe) {
|
||||||
if (!((TileGenericPipe)entity).pipe.inputOpen(o.reverse())){
|
Pipe pipe = ((TileGenericPipe) entity).pipe;
|
||||||
|
|
||||||
|
if (pipe == null || !pipe.inputOpen(o.reverse())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue