From e6d52855166ba81896b6b69ab84d929457a3affe Mon Sep 17 00:00:00 2001 From: Rodrigo Kumpera Date: Fri, 17 May 2013 10:59:20 -0400 Subject: [PATCH] Fail with an exception when loading the value of field of a broken class. Fixes #11362 * object.c (mono_field_get_value_object): If the field belongs to a class with a broken vtable, lets raise an exception instead of printing a message and returning NULL. Fixes #11362 --- mono/metadata/object.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/mono/metadata/object.c b/mono/metadata/object.c index bfd6de51adb..cb0c816cf06 100644 --- a/mono/metadata/object.c +++ b/mono/metadata/object.c @@ -3178,14 +3178,7 @@ mono_field_get_value_object (MonoDomain *domain, MonoClassField *field, MonoObje is_static = TRUE; if (!is_literal) { - vtable = mono_class_vtable (domain, field->parent); - if (!vtable) { - char *name = mono_type_get_full_name (field->parent); - /*FIXME extend this to use the MonoError api*/ - g_warning ("Could not retrieve the vtable for type %s in mono_field_get_value_object", name); - g_free (name); - return NULL; - } + vtable = mono_class_vtable_full (domain, field->parent, TRUE); if (!vtable->initialized) mono_runtime_class_init (vtable); } -- 2.11.4.GIT