Add guards
authorMiguel de Icaza <miguel@gnome.org>
Thu, 2 Apr 2009 00:01:08 +0000 (00:01 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Thu, 2 Apr 2009 00:01:08 +0000 (00:01 -0000)
svn path=/trunk/mcs/; revision=130816

mcs/mcs/namespace.cs

index 45dc0595a2bd0d69dbf951f5dc1b74108740da55..f8a118f8ebc202ec592edcaa432a7f8fcab4e026 100644 (file)
@@ -158,6 +158,10 @@ namespace Mono.CSharp {
 
                protected static Type GetTypeInAssembly (Assembly assembly, string name)
                {
+                       if (assembly == null)
+                               throw new ArgumentNullException ("assembly");
+                       if (name == null)
+                               throw new ArgumentNullException ("name");
                        Type t = assembly.GetType (name);
                        if (t == null)
                                return null;