Skip to content

Commit 696d479

Browse files
committed
[mono][jit] Fix a JIT assert.
Fixes #57560.
1 parent ff135fe commit 696d479

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/mono/mono/mini/method-to-ir.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7336,9 +7336,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
73367336
ERROR_DECL (error);
73377337

73387338
MonoMethod *new_cmethod = mono_class_get_virtual_method (sp [0]->klass, cmethod, error);
7339-
mono_error_assert_ok (error);
7340-
cmethod = new_cmethod;
7341-
virtual_ = FALSE;
7339+
if (is_ok (error)) {
7340+
cmethod = new_cmethod;
7341+
virtual_ = FALSE;
7342+
} else {
7343+
mono_error_cleanup (error);
7344+
}
73427345
}
73437346

73447347
if (cmethod && method_does_not_return (cmethod)) {

0 commit comments

Comments
 (0)