Просмотр исходного кода

* EventDescriptorCollection.cs: Handle null in the constructor properly.

svn path=/trunk/mcs/; revision=41384
Jackson Harper 21 лет назад
Родитель
Сommit
bee0840a2d

+ 4 - 0
mcs/class/System/System.ComponentModel/ChangeLog

@@ -1,3 +1,7 @@
+2005-03-02  Jackson Harper  <[email protected]>
+
+	* EventDescriptorCollection.cs: Handle null in the constructor properly.
+
 2005-02-12  Geoff Norton  <[email protected]>
 
 	* CharConverter.cs: Implement the ability to convert from "".

+ 3 - 0
mcs/class/System/System.ComponentModel/EventDescriptorCollection.cs

@@ -53,6 +53,9 @@ namespace System.ComponentModel
 		
 		public EventDescriptorCollection (EventDescriptor[] events) 
 		{
+			if (events == null)
+				return;
+
 			for (int i = 0; i < events.Length; i++)
 				this.Add (events[i]);
 		}