add: if (!scr->session_state) { return; }
context: wMenuRestoreState(WScreen *scr){    WMPropList *menus, *menu, *key, *skey;    key = WMCreatePLString("Menus");    menus = WMGetFromPLDictionary(scr->session_state, key);    WMReleasePropList(key);    if (!menus)        return;    /* restore menus */    skey = WMCreatePLString("SwitchMenu");    menu = WMGetFromPLDictionary(menus, skey);    WMReleasePropList(skey);    restoreMenu(scr, menu, WSS_SWITCHMENU);#ifndef LITE    if (!scr->root_menu) {        OpenRootMenu(scr, scr->scr_width*2, 0, False);        wMenuUnmap(scr->root_menu);    }    restoreMenuRecurs(scr, menus, scr->root_menu, "");#endif /* !LITE */}