Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbevain <jbevain@gmail.com>2010-09-22 02:28:46 +0400
committerjbevain <jbevain@gmail.com>2010-09-22 02:28:46 +0400
commit921537f15254481600da59dfe5aee09ee04315d6 (patch)
tree597914056c34e57f2f6f4d77267a40f9bca718cd /Mono.Collections.Generic
parent6314230d91da95085bbd31dbd2b7c664dc546eb2 (diff)
Validate ReadOnlyCollection constructor inputs
Diffstat (limited to 'Mono.Collections.Generic')
-rw-r--r--Mono.Collections.Generic/ReadOnlyCollection.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Mono.Collections.Generic/ReadOnlyCollection.cs b/Mono.Collections.Generic/ReadOnlyCollection.cs
index be686a4..35c9cd8 100644
--- a/Mono.Collections.Generic/ReadOnlyCollection.cs
+++ b/Mono.Collections.Generic/ReadOnlyCollection.cs
@@ -49,12 +49,18 @@ namespace Mono.Collections.Generic {
public ReadOnlyCollection (T [] array)
{
+ if (array == null)
+ throw new ArgumentNullException ();
+
this.items = array;
this.size = array.Length;
}
public ReadOnlyCollection (Collection<T> collection)
{
+ if (collection == null)
+ throw new ArgumentNullException ();
+
this.items = collection.items;
this.size = collection.size;
}