From 633697f11685f6d2cadb24947d1bdf3a18112ac9 Mon Sep 17 00:00:00 2001 From: MachineMuse Date: Mon, 8 Sep 2014 02:05:40 -0600 Subject: [PATCH] fix for obscure keybinding crash --- .../machinemuse/general/gui/frame/KeybindConfigFrame.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/minecraft/net/machinemuse/general/gui/frame/KeybindConfigFrame.java b/src/minecraft/net/machinemuse/general/gui/frame/KeybindConfigFrame.java index 0580c2c..01548af 100644 --- a/src/minecraft/net/machinemuse/general/gui/frame/KeybindConfigFrame.java +++ b/src/minecraft/net/machinemuse/general/gui/frame/KeybindConfigFrame.java @@ -274,7 +274,13 @@ public class KeybindConfigFrame implements IGuiFrame { } private void addKeybind(int key, boolean free) { - KeyBinding keybind = new KeyBinding(Keyboard.getKeyName(key), key); + String name; + try { + name = Keyboard.getKeyName(key); + } catch (Exception e) { + name = "???"; + } + KeyBinding keybind = new KeyBinding(name, key); ClickableKeybinding clickie = new ClickableKeybinding(keybind, newKeybindButton.getPosition().plus(new MusePoint2D(0, -20)), free); KeybindManager.getKeybindings().add(clickie); }