add:    if (!loadedFolder) return false;  
context: function SetupUndoRedoCommand(command){    var loadedFolder = GetLoadedMsgFolder();    var server = loadedFolder.server;    if (!(server.canUndoDeleteOnServer))      return false;    var canUndoOrRedo = false;    var txnType = 0;    if (command == "cmd_undo")    {        canUndoOrRedo = messenger.CanUndo();        txnType = messenger.GetUndoTransactionType();    }    else    {        canUndoOrRedo = messenger.CanRedo();        txnType = messenger.GetRedoTransactionType();    }    if (canUndoOrRedo)    {        switch (txnType)        {        default:        case 0:            goSetMenuValue(command, 'valueDefault');            break;        case 1:            goSetMenuValue(command, 'valueDeleteMsg');            break;        case 2:            goSetMenuValue(command, 'valueMoveMsg');            break;        case 3:            goSetMenuValue(command, 'valueCopyMsg');            break;        }    }    else    {        goSetMenuValue(command, 'valueDefault');    }    return canUndoOrRedo;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/12a1cd45960c3168038316e795798d4a0a62c59f/mailWindowOverlay.js/buggy/mailnews/base/resources/content/mailWindowOverlay.js