Browse Source

2009-02-28 Marek Habersack <[email protected]>

	* WebConfigurationManager.cs: make sure no nrex happens in
	GetSectionCacheKey ()

svn path=/trunk/mcs/; revision=128251
Marek Habersack 17 years ago
parent
commit
cab3168b4d

+ 5 - 0
mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog

@@ -1,3 +1,8 @@
+2009-02-28  Marek Habersack  <[email protected]>
+
+	* WebConfigurationManager.cs: make sure no nrex happens in
+	GetSectionCacheKey ()
+
 2009-02-26 Gonzalo Paniagua Javier <[email protected]>
 
 	* WebConfigurationManager.cs: generate a hash from the string hsah

+ 1 - 1
mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs

@@ -487,7 +487,7 @@ namespace System.Web.Configuration {
 
 		static int GetSectionCacheKey (string sectionName, string path)
 		{
-			return sectionName.GetHashCode () ^ (path.GetHashCode () + 37);
+			return (sectionName != null ? sectionName.GetHashCode () : 0) ^ ((path != null ? path.GetHashCode () : 0) + 37);
 		}