1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: ensure internal_code is not NULL when adding a default key (issue #1875)

This commit is contained in:
Sébastien Helleu
2023-01-28 22:55:04 +01:00
parent 3005658f38
commit c68c2aaa94
+4 -4
View File
@@ -59,14 +59,14 @@ gui_key_default_bind (int context, const char *key, const char *command)
char *internal_code;
internal_code = gui_key_get_internal_code (key);
if (!internal_code)
return;
ptr_key = gui_key_search (gui_keys[context],
(internal_code) ? internal_code : key);
ptr_key = gui_key_search (gui_keys[context], internal_code);
if (!ptr_key)
gui_key_new (NULL, context, key, command);
if (internal_code)
free (internal_code);
free (internal_code);
}
/*