From a0a9f977b4f856625535f6f80ab219593d94e444 Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Sun, 18 Aug 2024 12:18:41 +0900 Subject: [PATCH] config: fix assertion failure on When is expressed as a child node rather than an attribute, `content` in `fill_touch()` becomes NULL when the parser reaches . --- src/config/rcxml.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/config/rcxml.c b/src/config/rcxml.c index 30fd6afe..fa4163c7 100644 --- a/src/config/rcxml.c +++ b/src/config/rcxml.c @@ -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);