rem: if (!selectedIcons) {
add: if (!WMGetBagItemCount(selectedIcons)) {
context: selectIconsCallback(WMenu *menu, WMenuEntry *entry){    WAppIcon *clickedIcon = (WAppIcon*)entry->clientdata;    WDock *dock;    LinkedList *selectedIcons;    WAppIcon *btn;    int i;    assert(clickedIcon!=NULL);    dock = clickedIcon->dock;    selectedIcons = getSelected(dock);    if (!selectedIcons) {        for (i=1; i<dock->max_icons; i++) {            btn = dock->icon_array[i];            if (btn && !btn->icon->selected) {		wIconSelect(btn->icon);            }        }    } else {        while(selectedIcons) {            btn = selectedIcons->head;	    wIconSelect(btn->icon);            list_remove_head(&selectedIcons);        }    }    wMenuPaint(menu);}