From af39684885c519b44b654900fd89b80d4760fdb8 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sat, 4 Aug 2018 20:22:44 +0200 Subject: [PATCH] Fix Mono exception handling. First of all, this fixes the handling of exceptions so the engine actually notices them, it was broken in 4172fa03b56bb60fe096639585e0ca40df73b677. Next, unhandled exceptions now do NOT cause an abort(). They're logged now, so before #16987. The pending exception thing still works though. --- modules/mono/mono_gd/gd_mono_utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp index 911d6299565..bebc3b863fc 100644 --- a/modules/mono/mono_gd/gd_mono_utils.cpp +++ b/modules/mono/mono_gd/gd_mono_utils.cpp @@ -590,14 +590,14 @@ current_invoke_count = 0; MonoObject *runtime_invoke(MonoMethod *p_method, void *p_obj, void **p_params, MonoException **p_exc) { GD_MONO_BEGIN_RUNTIME_INVOKE; - MonoObject *ret = mono_runtime_invoke(p_method, p_obj, p_params, (MonoObject **)&p_exc); + MonoObject *ret = mono_runtime_invoke(p_method, p_obj, p_params, (MonoObject **)p_exc); GD_MONO_END_RUNTIME_INVOKE; return ret; } MonoObject *runtime_invoke_array(MonoMethod *p_method, void *p_obj, MonoArray *p_params, MonoException **p_exc) { GD_MONO_BEGIN_RUNTIME_INVOKE; - MonoObject *ret = mono_runtime_invoke_array(p_method, p_obj, p_params, (MonoObject **)&p_exc); + MonoObject *ret = mono_runtime_invoke_array(p_method, p_obj, p_params, (MonoObject **)p_exc); GD_MONO_END_RUNTIME_INVOKE; return ret; }