rem: XMapWindow(dpy, wwin->icon->core->window); wwin->icon->mapped = 1;
add: if (wwin->icon) { XMapWindow(dpy, wwin->icon->core->window); wwin->icon->mapped = 1; }
context: wWindowChangeWorkspace(WWindow *wwin, int workspace){    WScreen *scr = wwin->screen_ptr;    WApplication *wapp;    int unmap = 0;    if (workspace >= scr->workspace_count || workspace < 0 	|| workspace == wwin->frame->workspace)	return;    if (workspace != scr->current_workspace) {	/* Sent to other workspace. Unmap window */	if ((wwin->flags.mapped	     || wwin->flags.shaded	     || (wwin->flags.miniaturized && !wPreferences.sticky_icons))	    && !IS_OMNIPRESENT(wwin) && !wwin->flags.changing_workspace) {	    wapp = wApplicationOf(wwin->main_window);	    if (wapp) {		wapp->last_workspace = workspace;	    }	    if (wwin->flags.miniaturized) {		XUnmapWindow(dpy, wwin->icon->core->window);		wwin->icon->mapped = 0;	    } else {		unmap = 1;		wSetFocusTo(scr, NULL);	    }	}    } else {	/* brought to current workspace. Map window */	if (wwin->flags.miniaturized && !wPreferences.sticky_icons) {	    XMapWindow(dpy, wwin->icon->core->window);	    wwin->icon->mapped = 1;	} else if (!wwin->flags.mapped && 	    !(wwin->flags.miniaturized || wwin->flags.hidden)) {	    wWindowMap(wwin);	}    }    if (!IS_OMNIPRESENT(wwin)) {	wwin->frame->workspace = workspace;        UpdateSwitchMenu(scr, wwin, ACTION_CHANGE_WORKSPACE);    }#ifdef GNOME_STUFF    wGNOMEUpdateClientStateHint(wwin, True);#endif#ifdef KWM_HINTS    wKWMUpdateClientWorkspace(wwin);    wKWMSendEventMessage(wwin, WKWMChangedClient);#endif    if (unmap) {	wWindowUnmap(wwin);    }}