Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mono/mini/method-to-ir.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mono/mini/method-to-ir.c b/mono/mini/method-to-ir.c
index 8fa2b3feec7..01e4390412e 100644
--- a/mono/mini/method-to-ir.c
+++ b/mono/mini/method-to-ir.c
@@ -7238,9 +7238,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
ERROR_DECL (error);
MonoMethod *new_cmethod = mono_class_get_virtual_method (sp [0]->klass, cmethod, FALSE, error);
- mono_error_assert_ok (error);
- cmethod = new_cmethod;
- virtual_ = FALSE;
+ if (is_ok (error)) {
+ cmethod = new_cmethod;
+ virtual_ = FALSE;
+ } else {
+ mono_error_cleanup (error);
+ }
}
if (cmethod && method_does_not_return (cmethod)) {