Ignore non-realizable reflection types.
authorRodrigo Kumpera <kumpera@gmail.com>
Sun, 2 Jan 2011 21:32:19 +0000 (05:32 +0800)
committerRodrigo Kumpera <kumpera@gmail.com>
Sun, 2 Jan 2011 21:53:44 +0000 (05:53 +0800)
* class.c (mono_class_implement_interface_slow): If the reflection
type has not been realized, ignore it since can't affort
to do it from here.

Fixes #656262

mono/metadata/class.c

index d93076f7e7271ccda8f446f6703d81d4fdfc714f..562c359aff5b7c3566e3dc325b44b932847f2fbe 100644 (file)
@@ -7361,6 +7361,9 @@ mono_class_implement_interface_slow (MonoClass *target, MonoClass *candidate)
                        if (tb && tb->interfaces) {
                                for (j = mono_array_length (tb->interfaces) - 1; j >= 0; --j) {
                                        MonoReflectionType *iface = mono_array_get (tb->interfaces, MonoReflectionType*, j);
+                                       /* we can't realize the type here since it can do pretty much anything. */
+                                       if (!iface->type)
+                                               continue;
                                        MonoClass *iface_class = mono_class_from_mono_type (iface->type);
                                        if (iface_class == target)
                                                return TRUE;