wrapper_method = mono_mb_create_method (mb, m.csig, m.csig->param_count + 16);
mono_cominterop_unlock ();
- vtable [vtable_index--] = mono_compile_method (wrapper_method);
+ vtable [vtable_index--] = mono_compile_method_checked (wrapper_method, error);
+ // cleanup, then error out if compile_method failed
for (param_index = sig_adjusted->param_count; param_index >= 0; param_index--)
if (mspecs [param_index])
mono_metadata_free_marshal_spec (mspecs [param_index]);
g_free (mspecs);
+ return_val_if_nok (error, NULL);
}
ccw_entry = g_new0 (MonoCCWInterface, 1);