MonoMethodSignature *sig;
guint8 **arg_buf;
void **args;
- MonoObject *this_arg, *res, *exc;
+ MonoObject *this_arg, *res, *exc = NULL;
MonoDomain *domain;
guint8 *this_buf;
#ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED
mono_stopwatch_start (&watch);
res = mono_runtime_try_invoke (m, m->klass->valuetype ? (gpointer) this_buf : (gpointer) this_arg, args, &exc, &error);
- if (exc == NULL && !mono_error_ok (&error)) {
+ if (!mono_error_ok (&error) && exc == NULL) {
exc = (MonoObject*) mono_error_convert_to_exception (&error);
} else {
mono_error_cleanup (&error); /* FIXME report error */