Fixed crash with GUI when toggling the Grid size quickly, fixes #1440

This commit is contained in:
raoulvdberge
2017-09-02 14:21:11 +02:00
parent 78cd47a619
commit 6745ea8ff3
2 changed files with 4 additions and 5 deletions

View File

@@ -162,7 +162,9 @@ public abstract class GuiBase extends GuiContainer {
String sideButtonTooltip = null;
for (GuiButton button : buttonList) {
for (int i = 0; i < buttonList.size(); ++i) {
GuiButton button = buttonList.get(i);
if (button instanceof SideButton && ((SideButton) button).isHovered()) {
sideButtonTooltip = ((SideButton) button).getTooltip();
}
@@ -327,10 +329,6 @@ public abstract class GuiBase extends GuiContainer {
GlStateManager.enableLighting();
}
public void drawTooltip(int x, int y, List<String> lines) {
drawTooltip(ItemStack.EMPTY, x, y, lines);
}
public void drawTexture(int x, int y, int textureX, int textureY, int width, int height) {
drawTexturedModalRect(x, y, textureX, textureY, width, height);
}