add:  if (client.viewsArray.length < 2) { display(MSG_ERR_LAST_VIEW_HIDE, MT_ERROR); return; } 
context: function cmdHideView(e){    if (!e.view)        e.view = e.sourceObject;    var tb = getTabForObject(e.view);    if (tb)    {        var i = deleteTab (tb);        if (i != -1)        {            client.deck.removeChild(e.view.frame);            delete e.view.frame;            var oldView = client.currentObject;            if (client.currentObject == e.view)            {                if (i >= client.viewsArray.length)                    i = client.viewsArray.length - 1;                oldView = client.viewsArray[i].source            }            client.currentObject = null;            oldView.dispatch("set-current-view", { view: oldView });        }    }}
meta: 1622	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1622/c27c8e2126ee45a36ec959af9b0d5c502d53e57c/commands.js/buggy/xul/content/commands.js