From 97b7dec85e6145bf968b9ac80a2cb2b5bdd5dbc7 Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Sat, 20 Oct 2001 06:24:07 +0000 Subject: [PATCH] fix for #105659. fix js warnings when there isn't a mapiregistry service. r=srilatha, sr=mscott git-svn-id: svn://10.0.0.236/trunk@105874 18797224-902f-48f8-a5cc-f745e15eee43 --- .../base/prefs/resources/content/accountUtils.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mozilla/mailnews/base/prefs/resources/content/accountUtils.js b/mozilla/mailnews/base/prefs/resources/content/accountUtils.js index e361da4d13d..87b35d9e00b 100644 --- a/mozilla/mailnews/base/prefs/resources/content/accountUtils.js +++ b/mozilla/mailnews/base/prefs/resources/content/accountUtils.js @@ -81,13 +81,20 @@ function getInvalidAccounts(accounts) // This will bring up the dialog only once per session and only if we // are not the default mail client. function showMailIntegrationDialog() { - try { - var mapiRegistry = Components.classes[ "@mozilla.org/mapiregistry;1" ]. - getService( Components.interfaces.nsIMapiRegistry ); + var mapiRegistry; + try { + var mapiRegistryProgID = "@mozilla.org/mapiregistry;1" + if (mapiRegistryProgID in Components.classes) { + mapiRegistry = Components.classes[mapiRegistryProgID].getService(Components.interfaces.nsIMapiRegistry); + } + else { + mapiRegistry = null; + } } catch (ex) { mapiRegistry = null; } + // showDialog is TRUE only if we did not bring up this dialog already // and we are not the default mail client var prefLocked = false;