rem: var charset = msgWindow.mailCharacterSet; if (charset.length > 0) { menu.SetCurrentMailCharset(charset); dump("mailCharsetLoadListener: " + charset + " \n"); 
add: if (msgWindow) { var charset = msgWindow.mailCharacterSet; if (charset.length > 0) { menu.SetCurrentMailCharset(charset); dump("mailCharsetLoadListener: " + charset + " \n"); } 
context: function mailCharsetLoadListener (event){    var menu = Components.classes['component://netscape/rdf/datasource?name=charset-menu'];    if (menu) {        menu = menu.getService();        menu = menu.QueryInterface(Components.interfaces.nsICurrentCharsetListener);                var charset = msgWindow.mailCharacterSet;        if (charset.length > 0) {            menu.SetCurrentMailCharset(charset);            dump("mailCharsetLoadListener: " + charset + " \n");        }    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f30b1594ca33bd675dc16e668bc67d01859ca760/charsetOverlay.js/buggy/xpfe/global/resources/content/charsetOverlay.js