2010-02-12 Mark Probst <mark.probst@gmail.com>
authorMark Probst <mark.probst@gmail.com>
Thu, 11 Feb 2010 23:50:30 +0000 (23:50 -0000)
committerMark Probst <mark.probst@gmail.com>
Thu, 11 Feb 2010 23:50:30 +0000 (23:50 -0000)
        * reflection.c (ensure_complete_type): Check that reflection_info
        is set, too.  Fixes crash of corlib testsuite with -O=-all.

svn path=/trunk/mono/; revision=151570

mono/metadata/ChangeLog
mono/metadata/reflection.c

index f99d9c2b54f3f97a45f238853249521ce61ae37f..bf1aa19a09457a62e350277045359f9b10e4d9eb 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-12  Mark Probst  <mark.probst@gmail.com>
+
+       * reflection.c (ensure_complete_type): Check that reflection_info
+       is set, too.  Fixes crash of corlib testsuite with -O=-all.
+
 2010-02-11  Rodrigo Kumpera  <rkumpera@novell.com>
 
        * attrdefs.h:
index e51a64c5f55006c618516196d8280df2840e0713..515a07c1bd913e763ce4999ec883dd571ac31210 100644 (file)
@@ -11304,7 +11304,7 @@ mono_reflection_lookup_dynamic_token (MonoImage *image, guint32 token, gboolean
 static void
 ensure_complete_type (MonoClass *klass)
 {
-       if (klass->image->dynamic && !klass->wastypebuilder) {
+       if (klass->image->dynamic && !klass->wastypebuilder && klass->reflection_info) {
                MonoReflectionTypeBuilder *tb = klass->reflection_info;
 
                mono_domain_try_type_resolve (mono_domain_get (), NULL, (MonoObject*)tb);