Fix a warning.
[mono.git] / mono / metadata / class.c
index 562c359aff5b7c3566e3dc325b44b932847f2fbe..1bda17d2bf05758669e1d3983cd3878db828002a 100644 (file)
@@ -7361,10 +7361,12 @@ mono_class_implement_interface_slow (MonoClass *target, MonoClass *candidate)
                        if (tb && tb->interfaces) {
                                for (j = mono_array_length (tb->interfaces) - 1; j >= 0; --j) {
                                        MonoReflectionType *iface = mono_array_get (tb->interfaces, MonoReflectionType*, j);
+                                       MonoClass *iface_class;
+
                                        /* we can't realize the type here since it can do pretty much anything. */
                                        if (!iface->type)
                                                continue;
-                                       MonoClass *iface_class = mono_class_from_mono_type (iface->type);
+                                       iface_class = mono_class_from_mono_type (iface->type);
                                        if (iface_class == target)
                                                return TRUE;
                                        if (is_variant && mono_class_is_variant_compatible_slow (target, iface_class))