2007-05-27 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / declsec.c
index e9925816145b5aa06be65aba28293d46a409686b..e64286ff4c7e511d70005ae0554a8d27c196de71 100644 (file)
@@ -19,7 +19,7 @@ mono_method_has_declsec (MonoMethod *method)
 {
        mono_jit_stats.cas_declsec_check++;
 
-       if (method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE) {
+       if (method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE || method->wrapper_type == MONO_WRAPPER_MANAGED_TO_MANAGED) {
                method = mono_marshal_method_from_wrapper (method);
                if (!method)
                        return FALSE;