Skip to content

Commit 24499d3

Browse files
Merge pull request #2145 from Unity-Technologies/6000.3/fix-mono-default-interface-method-crash
[6000.3] Fix Crash on Default Interface Methods Call
2 parents 8699644 + ed4f113 commit 24499d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mono/metadata/object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ build_imt_slots (MonoClass *klass, MonoVTable *vt, MonoDomain *domain, gpointer*
15711571
method = mono_class_get_method_by_index (mono_class_get_generic_class (iface)->container_class, method_slot_in_interface);
15721572
if (m_method_is_static (method))
15731573
continue;
1574-
if (mono_method_get_imt_slot (method) != slot_num) {
1574+
if (m_method_is_virtual(method) && mono_method_get_imt_slot (method) != slot_num) {
15751575
vt_slot ++;
15761576
continue;
15771577
}

0 commit comments

Comments
 (0)