mirror of
https://github.com/labwc/labwc.git
synced 2026-04-11 08:21:13 -04:00
config: fix assertion failure on <touch><deviceName>
When <touch><deviceName> is expressed as a child node rather than an attribute, `content` in `fill_touch()` becomes NULL when the parser reaches <deviceName>.
This commit is contained in:
parent
b667107d1a
commit
a0a9f977b4
1 changed files with 6 additions and 1 deletions
|
|
@ -545,7 +545,12 @@ fill_touch(char *nodename, char *content)
|
|||
if (!strcasecmp(nodename, "touch")) {
|
||||
current_touch = znew(*current_touch);
|
||||
wl_list_append(&rc.touch_configs, ¤t_touch->link);
|
||||
} else if (!strcasecmp(nodename, "deviceName.touch")) {
|
||||
return;
|
||||
} else if (!content) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!strcasecmp(nodename, "deviceName.touch")) {
|
||||
current_touch->device_name = xstrdup(content);
|
||||
} else if (!strcasecmp(nodename, "mapToOutput.touch")) {
|
||||
current_touch->output_name = xstrdup(content);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue