diff --git a/suite/common/utilityOverlay.js b/suite/common/utilityOverlay.js index af6521597f4..096b85030ba 100644 --- a/suite/common/utilityOverlay.js +++ b/suite/common/utilityOverlay.js @@ -61,19 +61,16 @@ function setOfflineUI(offline) //Checking for a preference "network.online", if it's locked, disabling // network icon and menu item - try { - var prefService = Components.classes["@mozilla.org/preferences-service;1"]; - prefService = prefService.getService(); - prefService = prefService.QueryInterface(Components.interfaces.nsIPrefService); - - var prefBranch = prefService.getBranch(null); - - var offlineLocked = prefBranch.prefIsLocked("network.online"); - - if (offlineLocked ) { - broadcaster.setAttribute("disabled","true"); - } - } catch(e) { + var prefService = Components.classes["@mozilla.org/preferences-service;1"]; + prefService = prefService.getService(); + prefService = prefService.QueryInterface(Components.interfaces.nsIPrefService); + + var prefBranch = prefService.getBranch(null); + + var offlineLocked = prefBranch.prefIsLocked("network.online"); + + if (offlineLocked ) { + broadcaster.setAttribute("disabled","true"); } var bundle = srGetStrBundle("chrome://communicator/locale/utilityOverlay.properties");