Merge pull request #3057 from BrzVlad/fix-major-log3
[mono.git] / mcs / class / corlib / System.Runtime.Remoting / TypeInfo.cs
index 59f2c8bbd8ee64a53fe29e349622ea8034a6da92..06f54b12cebc44afca5334119e9e1837c7f64297 100644 (file)
@@ -56,7 +56,7 @@ namespace System.Runtime.Remoting
 
                                int baseCount = 0;
                                Type baseType = type.BaseType;
-                               while (baseType != typeof (MarshalByRefObject) && baseType != typeof(object))
+                               while (baseType != typeof (MarshalByRefObject) && baseType != null)
                                {
                                        baseType = baseType.BaseType;
                                        baseCount++;