Skip to content

Commit 8be75a7

Browse files
authored
Merge pull request #1474 from Unity-Technologies/callvirt-static-abort
Adding null check to avoid invalid il abort [case 1353003]
2 parents 7f8e521 + de558f9 commit 8be75a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mono/mini/method-to-ir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7456,7 +7456,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
74567456

74577457
sp -= n;
74587458

7459-
if (virtual_ && cmethod && sp [0]->opcode == OP_TYPED_OBJREF) {
7459+
if (virtual_ && cmethod && sp[0] && sp [0]->opcode == OP_TYPED_OBJREF) {
74607460
ERROR_DECL (error);
74617461

74627462
MonoMethod *new_cmethod = mono_class_get_virtual_method (sp [0]->klass, cmethod, FALSE, error);

0 commit comments

Comments
 (0)