if (!dont_verify && !cfg->skip_visibility) {
MonoMethod *target_method = cil_method;
if (method->is_inflated) {
- target_method = mini_get_method_allow_open (method, token, NULL, &(mono_method_get_generic_container (method_definition)->context), cfg->error);
+ MonoGenericContainer *container = mono_method_get_generic_container(method_definition);
+ MonoGenericContext *context = (container != NULL ? &container->context : NULL);
+ target_method = mini_get_method_allow_open (method, token, NULL, context, cfg->error);
CHECK_CFG_ERROR;
}
if (!mono_method_can_access_method (method_definition, target_method) &&
MonoMethod *target_method = cil_method;
if (method->is_inflated) {
- target_method = mini_get_method_allow_open (method, token, NULL, &(mono_method_get_generic_container (method_definition)->context), cfg->error);
+ MonoGenericContainer *container = mono_method_get_generic_container(method_definition);
+ MonoGenericContext *context = (container != NULL ? &container->context : NULL);
+ target_method = mini_get_method_allow_open (method, token, NULL, context, cfg->error);
CHECK_CFG_ERROR;
}