Merge pull request #3809 from lateralusX/jlorenss/win-api-family-support-cleanup
[mono.git] / mono / metadata / security-core-clr.c
index b93c72203221ac36fd6a656ca7a2d5fa4dff61a0..f817f956297457016c5c2a7665d87b96fdd59da1 100644 (file)
@@ -206,7 +206,8 @@ get_default_ctor (MonoClass *klass)
        if (!klass->methods)
                return NULL;
 
-       for (i = 0; i < klass->method.count; ++i) {
+       int mcount = mono_class_get_method_count (klass);
+       for (i = 0; i < mcount; ++i) {
                MonoMethodSignature *sig;
                MonoMethod *method = klass->methods [i];