mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-10-25 20:32:20 +00:00
Prevent random crashes. No idea why this happens, but deal with it gracefully.
This commit is contained in:
1 parent
285e7c528a
commit
23888bd46d
1 file changed
+8
-2
@@ -461,8 +461,14 @@ public class GuiContainerManager
|
||||
// Support for LWGJL 2.9.0 or later
|
||||
int k = Keyboard.getEventKey();
|
||||
char c = Keyboard.getEventCharacter();
|
||||
if (Keyboard.getEventKeyState() || (k == 0 && Character.isDefined(c)))
|
||||
keyTyped(c, k);
|
||||
if (Keyboard.getEventKeyState() || (k == 0 && Character.isDefined(c))) {
|
||||
try {
|
||||
keyTyped(c, k);
|
||||
} catch (java.lang.IndexOutOfBoundsException e) {
|
||||
System.err.println("Caught out of bounds exception pressing " + c + " " + k);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
window.mc.func_152348_aa();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user