fix for obscure keybinding crash
This commit is contained in:
parent
7f50abdfd0
commit
633697f116
1 changed files with 7 additions and 1 deletions
|
@ -274,7 +274,13 @@ public class KeybindConfigFrame implements IGuiFrame {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addKeybind(int key, boolean free) {
|
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);
|
ClickableKeybinding clickie = new ClickableKeybinding(keybind, newKeybindButton.getPosition().plus(new MusePoint2D(0, -20)), free);
|
||||||
KeybindManager.getKeybindings().add(clickie);
|
KeybindManager.getKeybindings().add(clickie);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue