menu: try other paths (and fix memory leak) if fopen() fails

This commit is contained in:
John Lindgren 2024-07-08 11:04:57 -04:00 committed by Johan Malm
parent 5979cc137a
commit 3ca1e94b1f

View file

@ -671,7 +671,7 @@ parse_xml(const char *filename, struct server *server)
struct path *path = wl_container_of(elm, path, link);
FILE *stream = fopen(path->string, "r");
if (!stream) {
return;
continue;
}
wlr_log(WLR_INFO, "read menu file %s", path->string);
parse_stream(server, stream);