rem: if (PLIsArray(bp)) {
add: if (!bp || PLIsArray(bp)) {
context: buildSubmenu(_Panel *panel, proplist_t pl){    WMScreen *scr = WMWidgetScreen(panel->win);    WEditMenu *menu;    WEditMenuItem *item;    char *title;    proplist_t tp, bp;    int i;    tp = PLGetArrayElement(pl, 0);    title = PLGetString(tp);    menu = WCreateEditMenu(scr, title);        for (i = 1; i < PLGetNumberOfElements(pl); i++) {	proplist_t pi;		pi = PLGetArrayElement(pl, i);	tp = PLGetArrayElement(pi, 0);	bp = PLGetArrayElement(pi, 1);		title = PLGetString(tp);	if (PLIsArray(bp)) {	       /* it's a submenu */	    WEditMenu *submenu;	    	    submenu = buildSubmenu(panel, pi);	    	    item = WAddMenuItemWithTitle(menu, title);	    WSetEditMenuSubmenu(menu, item, submenu);	} else {	    ItemData *data;	    	    item = WAddMenuItemWithTitle(menu, title);	    	    data = parseCommand(pi);	    	    if (panel->markerPix[data->type])		WSetEditMenuItemImage(item, panel->markerPix[data->type]);	    WSetEditMenuItemData(item, data, (WMCallback*)freeItemData);	}    }    WSetEditMenuAcceptsDrop(menu, True);    WSetEditMenuDelegate(menu, &menuDelegate);    WMRealizeWidget(menu);    return menu;}