rem: if (client.currentObject == obj) 
add: if (("currentObject" in client && client.currentObject == obj) || !("output" in client) || !client.output) 
context: function setCurrentObject (obj){    if (!obj.messages)    {        dd ("** INVALID OBJECT passed to setCurrentObject **");        return;    }    if (client.currentObject == obj)        return;            var tb, userList;    if (client.currentObject)    {        tb = getTabForObject(client.currentObject);    }    if (tb)    {        tb.setAttribute ("selected", "false");        tb.setAttribute ("state", "normal");    }        if (client.output.firstChild)        client.output.removeChild (client.output.firstChild);    client.output.appendChild (obj.messages);    /* Unselect currently selected users. */    userList = document.getElementById("user-list");    if (userList)         /* Remove curently selection items before this tree gets rerooted,         * because it seems to remember the selections for eternity if not. */        userList.clearItemSelection ();        else        dd ("setCurrentObject: could not find element with ID='user-list'");    if (obj.TYPE == "IRCChannel")        client.rdf.setTreeRoot ("user-list", obj.getGraphResource());    else        client.rdf.setTreeRoot ("user-list", client.rdf.resNullChan);    client.currentObject = obj;    tb = getTabForObject(obj);    if (tb)    {        tb.setAttribute ("selected", "true");        tb.setAttribute ("state", "current");    }        var vk = Number(tb.getAttribute("viewKey"));    delete client.activityList[vk];    updateNetwork();    updateChannel();    updateTitle ();    if (client.PRINT_DIRECTION == 1)        scrollDown();    focusInput();}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/b8511d02e8bcb51d475c1c9a02b7a6f680ba5830/static.js/clean/extensions/irc/xul/content/static.js