mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
rcxml.c: survive incorrect keybind
This commit is contained in:
parent
3bc379cc08
commit
ec2c67338a
1 changed files with 8 additions and 2 deletions
|
|
@ -40,8 +40,14 @@ fill_keybind(char *nodename, char *content)
|
|||
if (!strcmp(nodename, "key")) {
|
||||
current_keybind = keybind_create(content);
|
||||
}
|
||||
/* We expect <keybind key=""> to come first */
|
||||
assert(current_keybind);
|
||||
/*
|
||||
* We expect <keybind key=""> to come first
|
||||
* If a invalid keybind has been provided, keybind_create() complains
|
||||
* so we just silently ignore it here.
|
||||
*/
|
||||
if (!current_keybind) {
|
||||
return;
|
||||
}
|
||||
if (!strcmp(nodename, "name.action")) {
|
||||
current_keybind->action = strdup(content);
|
||||
} else if (!strcmp(nodename, "command.action")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue