Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThays Grazia <thaystg@gmail.com>2019-09-09 17:00:18 +0300
committerMarek Safar <marek.safar@gmail.com>2019-09-09 20:17:01 +0300
commit6b4b99e571b94331765170418d875416bf295a4e (patch)
tree3e98442f79cc35b2b7b45d0b76381fa78264ee91
parent7af64d1ebe9e9ee305cdae8ec5995c9521cbcf19 (diff)
Vtable [i] can be null so this should be check before use it. Fixes #16712mono-6.4.0.190
-rw-r--r--mono/metadata/class-init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mono/metadata/class-init.c b/mono/metadata/class-init.c
index 5932f0814fa..45bc08e007a 100644
--- a/mono/metadata/class-init.c
+++ b/mono/metadata/class-init.c
@@ -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");