Skip to content

Commit 109cfe7

Browse files
ivanpovazanscott-ferguson-unity
authored andcommitted
1 parent 551b20e commit 109cfe7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

mono/mini/method-to-ir.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -7471,9 +7471,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
74717471
ERROR_DECL (error);
74727472

74737473
MonoMethod *new_cmethod = mono_class_get_virtual_method (sp [0]->klass, cmethod, FALSE, error);
7474-
mono_error_assert_ok (error);
7475-
cmethod = new_cmethod;
7476-
virtual_ = FALSE;
7474+
if (is_ok (error)) {
7475+
cmethod = new_cmethod;
7476+
virtual_ = FALSE;
7477+
} else {
7478+
mono_error_cleanup (error);
7479+
}
74777480
}
74787481

74797482
if (cmethod && method_does_not_return (cmethod)) {

0 commit comments

Comments
 (0)