diff --git a/mcs/class/System/ReferenceSources/AutoWebProxyScriptEngine.cs b/mcs/class/System/ReferenceSources/AutoWebProxyScriptEngine.cs index b667bdc9792b312d9f99b9ed3f5b0d5a5b35ba96..f85db9c3ffbe34669c0b9ec330f83e50cc38f411 100644 --- a/mcs/class/System/ReferenceSources/AutoWebProxyScriptEngine.cs +++ b/mcs/class/System/ReferenceSources/AutoWebProxyScriptEngine.cs @@ -131,7 +131,11 @@ namespace System.Net string strProxyServer = (string)Microsoft.Win32.Registry.GetValue ("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", "ProxyServer", null); string strProxyOverrride = (string)Microsoft.Win32.Registry.GetValue ("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", "ProxyOverride", null); - + + if(strProxyServer == null) { + return null; + } + if (strProxyServer.Contains ("=")) { foreach (string strEntry in strProxyServer.Split (new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries)) if (strEntry.StartsWith ("http=")) {