config: survive parsing error

It is no good crashing on an rc.xml syntax error, particularly on a
SIGHUP when the user could have applications open.
This commit is contained in:
Johan Malm 2021-10-15 20:33:55 +01:00
parent 73b8f06a26
commit f8e1d76333

View file

@ -383,8 +383,8 @@ rcxml_parse_xml(struct buf *b)
{
xmlDoc *d = xmlParseMemory(b->buf, b->len);
if (!d) {
wlr_log(WLR_ERROR, "xmlParseMemory()");
exit(EXIT_FAILURE);
wlr_log(WLR_ERROR, "error parsing config file");
return;
}
xml_tree_walk(xmlDocGetRootElement(d));
xmlFreeDoc(d);