Fix: Don't allow a separator as root for submenus.
This commit is contained in:
parent
60ddf397e3
commit
78cdb02be6
4
xmenu.c
4
xmenu.c
|
@ -432,6 +432,10 @@ buildmenutree(unsigned level, const char *label, const char *output, char *file)
|
|||
for (item = prevmenu->list; item->next != NULL; item = item->next)
|
||||
;
|
||||
|
||||
/* a separator is no valid root for a submenu */
|
||||
if (!item->label)
|
||||
errx(1, "a separator is no valid root for a submenu");
|
||||
|
||||
prevmenu = menu;
|
||||
menu->caller = item;
|
||||
item->submenu = menu;
|
||||
|
|
Loading…
Reference in New Issue
Block a user