added provision against NPE

This commit is contained in:
SpaceToad 2014-05-09 18:13:15 +02:00
parent 1febf3c714
commit 8f75c80618

View file

@ -541,13 +541,11 @@ public class BlockGenericPipe extends BlockBuildCraft {
}
public static void removePipe(Pipe pipe) {
if (pipe == null) {
if (!isValid(pipe)) {
return;
}
if (isValid(pipe)) {
pipe.onBlockRemoval();
}
pipe.onBlockRemoval();
World world = pipe.container.getWorldObj();