rem: if (wwin->screen_ptr->shortcutSelectedWindows[i]) { WMRemoveFromBag(wwin->screen_ptr->shortcutSelectedWindows[i], wwin);
add: if (!wwin->screen_ptr->shortcutWindows[i]) continue;
context: wWindowDestroy(WWindow *wwin){    int i;    WMRemoveNotificationObserver(wwin);        wwin->flags.destroyed = 1;    for (i = 0; i < MAX_WINDOW_SHORTCUTS; i++) {	if (wwin->screen_ptr->shortcutSelectedWindows[i]) {	    WMRemoveFromBag(wwin->screen_ptr->shortcutSelectedWindows[i], wwin);	    if (!WMGetBagItemCount(wwin->screen_ptr->shortcutSelectedWindows[i])) {		WMFreeBag(wwin->screen_ptr->shortcutSelectedWindows[i]);		wwin->screen_ptr->shortcutSelectedWindows[i] = NULL;	    }	}    }    if (wwin->normal_hints)      free(wwin->normal_hints);        if (wwin->wm_hints)      XFree(wwin->wm_hints);        if (wwin->wm_instance)      XFree(wwin->wm_instance);    if (wwin->wm_class)      XFree(wwin->wm_class);    if (wwin->wm_gnustep_attr)      free(wwin->wm_gnustep_attr);    if (wwin->cmap_windows)      XFree(wwin->cmap_windows);    XDeleteContext(dpy, wwin->client_win, wWinContext);    if (wwin->frame)	wFrameWindowDestroy(wwin->frame);    if (wwin->icon) {	RemoveFromStackList(wwin->icon->core);        wIconDestroy(wwin->icon);        if (wPreferences.auto_arrange_icons)            wArrangeIcons(wwin->screen_ptr, True);    }    wrelease(wwin);}