fix for regression bug #196073

without a mail acct, Send menu items fail
caused by my checkin for bug #99363
r/sr=bienvenu
This commit is contained in:
sspitzer%netscape.com 2003-03-05 21:33:05 +00:00
parent 0443050ee9
commit 34fc8cb8a7

View File

@ -38,7 +38,15 @@
}
var composeService = Components.classes["@mozilla.org/messengercompose;1"].getService(Components.interfaces.nsIMsgComposeService);
if (composeService) {
params.identity = composeService.defaultIdentity;
// it is possible you won't have a default identity
// like if you've never launched mail before on a new profile.
// see bug #196073
try {
params.identity = composeService.defaultIdentity;
}
catch (ex) {
params.identity = null;
}
composeService.OpenComposeWindowWithParams(null, params);
}
}