=== modified file 'content/startpage.html' --- a/content/startpage.html 2009-03-18 19:37:42 +0000 +++ b/content/startpage.html 2009-04-02 18:33:04 +0000 @@ -7,19 +7,23 @@ var HOMEPAGE_ONLINE = "http://start.ubuntu.com/9.04/"; var HOMEPAGE_OFFLINE = "file:///usr/share/ubuntu-artwork/home/index.html" var HOMEPAGE_OFFLINE_TMPL = "/usr/share/ubuntu-artwork/home/locales/index-" var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); var userAgentLocale = null; try { - var userAgentLocaleLocalized = - prefs.getComplexValue("general.useragent.locale", - Components.interfaces.nsIPrefLocalizedString); + var userAgentLocaleLocalized = null; + + try { + prefs.getComplexValue("general.useragent.locale", + Components.interfaces.nsIPrefLocalizedString); + } catch (e) {} + if (userAgentLocaleLocalized) { userAgentLocale = userAgentLocaleLocalized.toString(); } else { userAgentLocale = prefs.getCharPref("general.useragent.locale"); } } catch (e) { userAgentLocale = "en-US";} function get_valid_offlinehomepage() {