if (csignature->hasthis)
--sp;
child_frame.stack_args = sp;
- if (csignature->hasthis && mono_object_is_transparent_proxy (sp->data.p)) {
+
+ /* `this' can be NULL for string:.ctor */
+ if (csignature->hasthis && sp->data.p && mono_object_is_transparent_proxy (sp->data.p)) {
child_frame.runtime_method = mono_interp_get_runtime_method (context->domain, mono_marshal_get_remoting_invoke (child_frame.runtime_method->method), &error);
mono_error_cleanup (&error); /* FIXME: don't swallow the error */
} else if (child_frame.runtime_method->method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) {
if (child_frame.runtime_method->hasthis)
--sp;
child_frame.stack_args = sp;
- if (child_frame.runtime_method->hasthis && !child_frame.runtime_method->valuetype && mono_object_is_transparent_proxy (sp->data.p)) {
+
+ /* `this' can be NULL for string:.ctor */
+ if (child_frame.runtime_method->hasthis && !child_frame.runtime_method->valuetype && sp->data.p && mono_object_is_transparent_proxy (sp->data.p)) {
child_frame.runtime_method = mono_interp_get_runtime_method (context->domain, mono_marshal_get_remoting_invoke (child_frame.runtime_method->method), &error);
mono_error_cleanup (&error); /* FIXME: don't swallow the error */
}
mono_thread_interruption_checkpoint ();
sp->data.p = o;
} else {
+ sp->data.p = NULL;
child_frame.retval = &retval;
}
}