Skip to content

Commit

Permalink
Vtable [i] can be null so this should be check before use it. Fixes m…
Browse files Browse the repository at this point in the history
  • Loading branch information
thaystg authored and monojenkins committed Sep 9, 2019
1 parent 7af64d1 commit fdb4169
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mono/metadata/class-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -3334,7 +3334,7 @@ mono_class_setup_vtable_general (MonoClass *klass, MonoMethod **overrides, int o
if (!mono_class_is_abstract (klass)) {
for (i = 0; i < cur_slot; ++i) {
if (vtable [i] == NULL || (vtable [i]->flags & (METHOD_ATTRIBUTE_ABSTRACT | METHOD_ATTRIBUTE_STATIC))) {
if (vtable [i]->is_reabstracted == 1)
if (vtable [i] != NULL && vtable [i]->is_reabstracted == 1)
continue;
char *type_name = mono_type_get_full_name (klass);
char *method_name = vtable [i] ? mono_method_full_name (vtable [i], TRUE) : g_strdup ("none");
Expand Down

0 comments on commit fdb4169

Please sign in to comment.