rem: if (msgfolder) 
add:   if (msgfolder && !msgfolder.isServer) 
context: function ChangeFolderByDOMNode(folderNode){  var uri = folderNode.getAttribute('id');  dump(uri + "\n");  if (!uri) return;  var sortType = 0;  var sortOrder = 0;  var viewFlags = 0;  var viewType = 0;  var resource = RDF.GetResource(uri);  var msgfolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder);  if (msgfolder)  {    var msgdb = msgfolder.getMsgDatabase(msgWindow);    if (msgdb)    {      var dbFolderInfo = msgdb.dBFolderInfo;      sortType = dbFolderInfo.sortType;      sortOrder = dbFolderInfo.sortOrder;      viewFlags = dbFolderInfo.viewFlags;      viewType = dbFolderInfo.viewType;    }  }  ChangeFolderByURI(uri, viewType, viewFlags, sortType, sortOrder);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/5bc84ab8cf484190808370b008093c731f62cf4e/commandglue.js/buggy/mailnews/base/resources/content/commandglue.js