static int
mono_get_corlib_version (void)
{
+ MonoError error;
MonoClass *klass;
MonoClassField *field;
MonoObject *value;
return -1;
if (! (field->type->attrs & FIELD_ATTRIBUTE_STATIC))
return -1;
- value = mono_field_get_value_object (mono_domain_get (), field, NULL);
+ value = mono_field_get_value_object_checked (mono_domain_get (), field, NULL, &error);
+ mono_error_raise_exception (&error); /* FIXME don't raise here */
return *(gint32*)((gchar*)value + sizeof (MonoObject));
}