Skip to content

Commit 6b4b99e

Browse files
thaystgmarek-safar
authored andcommitted
Vtable [i] can be null so this should be check before use it. Fixes #16712
1 parent 7af64d1 commit 6b4b99e

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
@@ -3334,7 +3334,7 @@ mono_class_setup_vtable_general (MonoClass *klass, MonoMethod **overrides, int o
33343334
if (!mono_class_is_abstract (klass)) {
33353335
for (i = 0; i < cur_slot; ++i) {
33363336
if (vtable [i] == NULL || (vtable [i]->flags & (METHOD_ATTRIBUTE_ABSTRACT | METHOD_ATTRIBUTE_STATIC))) {
3337-
if (vtable [i]->is_reabstracted == 1)
3337+
if (vtable [i] != NULL && vtable [i]->is_reabstracted == 1)
33383338
continue;
33393339
char *type_name = mono_type_get_full_name (klass);
33403340
char *method_name = vtable [i] ? mono_method_full_name (vtable [i], TRUE) : g_strdup ("none");

0 commit comments

Comments
 (0)