Fix #465 crash after closing catalogue and opening another item gui

This commit is contained in:
mezz committed 2015-01-19 11:34:18 -08:00
1 parent f832025f6d
commit dc1449855e
2 files changed
+3 -3

No files matched your search

@@ -129,7 +129,7 @@ public class GuiCatalogue extends GuiForestry<TileForestry> {
protected void actionPerformed(GuiButton button) {
switch(button.id) {
case 0:
mc.displayGuiScreen(null);
mc.thePlayer.closeScreen();
break;
case 2:
container.advanceIteration();
@@ -146,7 +146,7 @@ public class GuiCatalogue extends GuiForestry<TileForestry> {
SessionVars.setStringVar("mail.letter.recipient", info.address.getName());
SessionVars.setStringVar("mail.letter.addressee", EnumAddressee.TRADER.toString());
}
mc.displayGuiScreen(null);
mc.thePlayer.closeScreen();
break;
}
}
@@ -72,7 +72,7 @@ public class GuiTradeName extends GuiForestry<MachineTrader> {
protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
// Close gui screen if we linked up.
if (container.machine.isLinked()) {
this.mc.displayGuiScreen(null);
this.mc.thePlayer.closeScreen();
this.mc.setIngameFocus();
}