[runtime] MonoError-ize mono_field_static_get_value
[mono.git] / mono / metadata / socket-io.c
index 6c3e0cf22875f07ffd8d1a3f6a77b4c61e396f3e..c6374c00c450ad8846c2f45bbc5354d446f60d5e 100644 (file)
@@ -618,8 +618,10 @@ get_family_hint (MonoError *error)
                mono_runtime_class_init_full (vtable, error);
                return_val_if_nok (error, -1);
 
-               mono_field_static_get_value (vtable, ipv4_field, &ipv4_enabled);
-               mono_field_static_get_value (vtable, ipv6_field, &ipv6_enabled);
+               mono_field_static_get_value_checked (vtable, ipv4_field, &ipv4_enabled, error);
+               return_val_if_nok (error, -1);
+               mono_field_static_get_value_checked (vtable, ipv6_field, &ipv6_enabled, error);
+               return_val_if_nok (error, -1);
 
                mono_domain_lock (domain);
                if (ipv4_enabled == 1 && ipv6_enabled == 1) {