[runtime] Move MonoClass::flags to MonoClassDef.
[mono.git] / mono / metadata / gc.c
index 416d9350d457ee40de9d018536ac2beb28a8bd3b..50c24b26cc1a3eb2656de12ef7d099046473c735 100644 (file)
@@ -732,7 +732,7 @@ ves_icall_System_GCHandle_GetAddrOfPinnedObject (guint32 handle)
                } else {
                        /* the C# code will check and throw the exception */
                        /* FIXME: missing !klass->blittable test, see bug #61134 */
-                       if ((klass->flags & TYPE_ATTRIBUTE_LAYOUT_MASK) == TYPE_ATTRIBUTE_AUTO_LAYOUT)
+                       if ((mono_class_get_flags (klass) & TYPE_ATTRIBUTE_LAYOUT_MASK) == TYPE_ATTRIBUTE_AUTO_LAYOUT)
                                return (gpointer)-1;
                        return (char*)obj + sizeof (MonoObject);
                }