Add some null checking to the pipe GUIs

Fixes #345
This commit is contained in:
CovertJaguar 2012-10-12 17:36:08 -07:00
parent d351f6455e
commit 1e0e23fe49

View file

@ -25,8 +25,10 @@ public class GuiHandler implements IGuiHandler {
TileGenericPipe pipe = (TileGenericPipe) tile;
switch (ID) {
if (pipe.pipe == null)
return null;
switch (ID) {
case GuiIds.PIPE_DIAMOND:
return new ContainerDiamondPipe(player.inventory, (PipeLogicDiamond)pipe.pipe.logic);
@ -49,8 +51,10 @@ public class GuiHandler implements IGuiHandler {
TileGenericPipe pipe = (TileGenericPipe) tile;
switch (ID) {
if (pipe.pipe == null)
return null;
switch (ID) {
case GuiIds.PIPE_DIAMOND:
return new GuiDiamondPipe(player.inventory, pipe);