From 0d8bf72cf36481b4d9c0ea28820b877f95ba33e0 Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Mon, 29 Apr 2002 22:23:17 +0000 Subject: [PATCH] Fix. --- camino/CHPreferenceManager.mm | 14 +++++++------- camino/src/preferences/PreferenceManager.mm | 14 +++++++------- chimera/CHPreferenceManager.mm | 14 +++++++------- chimera/src/preferences/PreferenceManager.mm | 14 +++++++------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/camino/CHPreferenceManager.mm b/camino/CHPreferenceManager.mm index 2e3d44f9779..7359717261c 100644 --- a/camino/CHPreferenceManager.mm +++ b/camino/CHPreferenceManager.mm @@ -130,7 +130,7 @@ extern const char *prefContractID; if ((cfDictionary = SCDynamicStoreCopyProxies (NULL)) != NULL) { cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.http", strbuf); @@ -142,7 +142,7 @@ extern const char *prefContractID; prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPSEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPSProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.ssl", strbuf); @@ -154,7 +154,7 @@ extern const char *prefContractID; prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesFTPEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesFTPProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.ftp", strbuf); @@ -166,25 +166,25 @@ extern const char *prefContractID; prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesGopherEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesGopherProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.gopher", strbuf); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesGopherPort); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { prefs->SetIntPref("network.proxy.gopher_port", numbuf); } prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesSOCKSEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesSOCKSProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.socks", strbuf); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesSOCKSPort); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { prefs->SetIntPref("network.proxy.socks_port", numbuf); } prefs->SetIntPref("network.proxy.type", 1); diff --git a/camino/src/preferences/PreferenceManager.mm b/camino/src/preferences/PreferenceManager.mm index 2e3d44f9779..7359717261c 100644 --- a/camino/src/preferences/PreferenceManager.mm +++ b/camino/src/preferences/PreferenceManager.mm @@ -130,7 +130,7 @@ extern const char *prefContractID; if ((cfDictionary = SCDynamicStoreCopyProxies (NULL)) != NULL) { cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.http", strbuf); @@ -142,7 +142,7 @@ extern const char *prefContractID; prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPSEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPSProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.ssl", strbuf); @@ -154,7 +154,7 @@ extern const char *prefContractID; prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesFTPEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesFTPProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.ftp", strbuf); @@ -166,25 +166,25 @@ extern const char *prefContractID; prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesGopherEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesGopherProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.gopher", strbuf); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesGopherPort); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { prefs->SetIntPref("network.proxy.gopher_port", numbuf); } prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesSOCKSEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesSOCKSProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.socks", strbuf); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesSOCKSPort); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { prefs->SetIntPref("network.proxy.socks_port", numbuf); } prefs->SetIntPref("network.proxy.type", 1); diff --git a/chimera/CHPreferenceManager.mm b/chimera/CHPreferenceManager.mm index 2e3d44f9779..7359717261c 100644 --- a/chimera/CHPreferenceManager.mm +++ b/chimera/CHPreferenceManager.mm @@ -130,7 +130,7 @@ extern const char *prefContractID; if ((cfDictionary = SCDynamicStoreCopyProxies (NULL)) != NULL) { cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.http", strbuf); @@ -142,7 +142,7 @@ extern const char *prefContractID; prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPSEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPSProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.ssl", strbuf); @@ -154,7 +154,7 @@ extern const char *prefContractID; prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesFTPEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesFTPProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.ftp", strbuf); @@ -166,25 +166,25 @@ extern const char *prefContractID; prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesGopherEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesGopherProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.gopher", strbuf); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesGopherPort); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { prefs->SetIntPref("network.proxy.gopher_port", numbuf); } prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesSOCKSEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesSOCKSProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.socks", strbuf); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesSOCKSPort); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { prefs->SetIntPref("network.proxy.socks_port", numbuf); } prefs->SetIntPref("network.proxy.type", 1); diff --git a/chimera/src/preferences/PreferenceManager.mm b/chimera/src/preferences/PreferenceManager.mm index 2e3d44f9779..7359717261c 100644 --- a/chimera/src/preferences/PreferenceManager.mm +++ b/chimera/src/preferences/PreferenceManager.mm @@ -130,7 +130,7 @@ extern const char *prefContractID; if ((cfDictionary = SCDynamicStoreCopyProxies (NULL)) != NULL) { cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.http", strbuf); @@ -142,7 +142,7 @@ extern const char *prefContractID; prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPSEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesHTTPSProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.ssl", strbuf); @@ -154,7 +154,7 @@ extern const char *prefContractID; prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesFTPEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesFTPProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.ftp", strbuf); @@ -166,25 +166,25 @@ extern const char *prefContractID; prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesGopherEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesGopherProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.gopher", strbuf); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesGopherPort); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { prefs->SetIntPref("network.proxy.gopher_port", numbuf); } prefs->SetIntPref("network.proxy.type", 1); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesSOCKSEnable); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE && numbuf == 1) { cfString = (CFStringRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesSOCKSProxy); if (CFStringGetCString (cfString, &strbuf[0], sizeof(strbuf)-1, kCFStringEncodingASCII) == TRUE) { prefs->SetCharPref("network.proxy.socks", strbuf); } cfNumber = (CFNumberRef)CFDictionaryGetValue (cfDictionary, kSCPropNetProxiesSOCKSPort); - if (CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { + if (cfNumber && CFNumberGetValue (cfNumber, kCFNumberIntType, &numbuf) == TRUE) { prefs->SetIntPref("network.proxy.socks_port", numbuf); } prefs->SetIntPref("network.proxy.type", 1);