Before this patch, labwc crashed menu.xml like this:
<openbox_menu>
<separator />
</openbox_menu>
static struct menuitem *
separator_create(struct menu *menu, const char *label)
{
+ assert(menu);
+
struct menuitem *menuitem = znew(*menuitem);
menuitem->parent = menu;
menuitem->selectable = false;
continue;
}
if (!strcasecmp((char *)n->name, "separator")) {
+ if (!ctx->menu) {
+ wlr_log(WLR_ERROR,
+ "ignoring <separator> without parent <menu>");
+ continue;
+ }
handle_separator_element(ctx, n);
continue;
}