Skip to content

Commit 68b7767

Browse files
thaystgmarek-safar
authored andcommitted
Vtable [i] can be null so this should be check before use it. Fixes #16712
1 parent 4a0b4f4 commit 68b7767

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mono/metadata/class-init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3313,7 +3313,7 @@ mono_class_setup_vtable_general (MonoClass *klass, MonoMethod **overrides, int o
33133313
if (!mono_class_is_abstract (klass)) {
33143314
for (i = 0; i < cur_slot; ++i) {
33153315
if (vtable [i] == NULL || (vtable [i]->flags & (METHOD_ATTRIBUTE_ABSTRACT | METHOD_ATTRIBUTE_STATIC))) {
3316-
if (vtable [i]->is_reabstracted == 1)
3316+
if (vtable [i] != NULL && vtable [i]->is_reabstracted == 1)
33173317
continue;
33183318
char *type_name = mono_type_get_full_name (klass);
33193319
char *method_name = vtable [i] ? mono_method_full_name (vtable [i], TRUE) : g_strdup ("none");

0 commit comments

Comments
 (0)