Update to the latest IKVM reflect
[mono.git] / mcs / class / IKVM.Reflection / Emit / TypeBuilder.cs
index b3e4da71cc8e3dbddfbe01ed950a226747ee5acc..61320b3b85b48b45be18ccd6c30e7e2c8af250a9 100644 (file)
@@ -415,9 +415,12 @@ namespace IKVM.Reflection.Emit
                public TypeBuilder DefineNestedType(string name, TypeAttributes attr, Type parent, Type[] interfaces)
                {
                        TypeBuilder tb = DefineNestedType(name, attr, parent);
-                       foreach (Type iface in interfaces)
+                       if (interfaces != null)
                        {
-                               tb.AddInterfaceImplementation(iface);
+                               foreach (Type iface in interfaces)
+                               {
+                                       tb.AddInterfaceImplementation(iface);
+                               }
                        }
                        return tb;
                }