summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 554014a)
raw | patch | inline | side by side (parent: 554014a)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 17 Sep 2006 19:52:28 +0000 (21:52 +0200) | ||
committer | Jonas Fonseca <fonseca@antimatter.localdomain> | |
Sun, 17 Sep 2006 22:26:01 +0000 (00:26 +0200) |
tig.c | patch | blob | history |
index de85ca1652056c317615cbd95efb3ce6dedd5dc7..3397489437fca65c549f4563e9af224f04a30a47 100644 (file)
--- a/tig.c
+++ b/tig.c
static void
add_keybinding(enum keymap keymap, enum request request, int key)
{
- struct keybinding *keybinding;
+ struct keybinding *keybinding = keybindings[keymap];
- keybinding = calloc(1, sizeof(*keybinding));
+ if (!keybinding)
+ keybinding = calloc(1, sizeof(*keybinding));
if (!keybinding)
die("Failed to allocate keybinding");