From 843933cad807d6ee27060649f5f654477b0fd653 Mon Sep 17 00:00:00 2001 From: "pinkerton%aol.net" Date: Mon, 12 Jul 2004 17:44:01 +0000 Subject: [PATCH] better error handling from IC, if we can't load the homepage, use about:blank (bug 245359) --- camino/src/preferences/PreferenceManager.mm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/camino/src/preferences/PreferenceManager.mm b/camino/src/preferences/PreferenceManager.mm index 5c488fb5c7f..968388464f6 100644 --- a/camino/src/preferences/PreferenceManager.mm +++ b/camino/src/preferences/PreferenceManager.mm @@ -653,8 +653,12 @@ static void SCProxiesChangedCallback(SCDynamicStoreRef store, CFArrayRef changed if (NS_FAILED(rv) || mode == 1) { // see which home page to use PRBool boolPref; - if (NS_SUCCEEDED(mPrefs->GetBoolPref("chimera.use_system_home_page", &boolPref)) && boolPref) - return [self getICStringPref:kICWWWHomePage]; + if (NS_SUCCEEDED(mPrefs->GetBoolPref("chimera.use_system_home_page", &boolPref)) && boolPref) { + NSString* homePage = [self getICStringPref:kICWWWHomePage]; + if (!homePage) + homePage = @"about:blank"; + return homePage; + } nsCOMPtr prefBranch = do_QueryInterface(mPrefs); if (!prefBranch) return @"about:blank";