Fix game freeze when resizing the window too small on the mods gui (#4148)
This commit is contained in:
parent
7517f56d5f
commit
cd4d701b5f
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue