Author: mhabersack
Date: 2007-12-05 08:12:41 -0500 (Wed, 05 Dec 2007)
New Revision: 90758
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
Log:
2007-12-05 Marek Habersack <[EMAIL PROTECTED]>
* ConfigurationElement.cs: some property values may be null
objects in GetHashCode.
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
===================================================================
---
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
2007-12-05 13:07:38 UTC (rev 90757)
+++
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
2007-12-05 13:12:41 UTC (rev 90758)
@@ -253,8 +253,16 @@
public override int GetHashCode ()
{
int code = 0;
- foreach (ConfigurationProperty prop in Properties)
- code += this [prop].GetHashCode ();
+ object o;
+
+ foreach (ConfigurationProperty prop in Properties) {
+ o = this [prop];
+ if (o == null)
+ continue;
+
+ code += o.GetHashCode ();
+ }
+
return code;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches