Fix game freeze when resizing the window too small on the mods gui (#4148)

This commit is contained in:
mezz 2017-07-08 22:55:45 -07:00
parent 7517f56d5f
commit cd4d701b5f

View file

@ -511,7 +511,11 @@ public class GuiModList extends GuiScreen
}
ITextComponent chat = ForgeHooks.newChatWithLinks(line, false);
ret.addAll(GuiUtilRenderComponents.splitText(chat, this.listWidth-8, GuiModList.this.fontRenderer, false, true));
int maxTextLength = this.listWidth - 8;
if (maxTextLength >= 0)
{
ret.addAll(GuiUtilRenderComponents.splitText(chat, maxTextLength, GuiModList.this.fontRenderer, false, true));
}
}
return ret;
}