for (i = 0; i < header->num_clauses; ++i) {
clause = &header->clauses [i];
if (MONO_OFFSET_IN_CLAUSE (clause, bb->real_offset)) {
- if (clause->data.catch_class && mono_class_is_assignable_from (clause->data.catch_class, exclass)) {
+ if (clause->flags == MONO_EXCEPTION_CLAUSE_NONE && clause->data.catch_class && mono_class_is_assignable_from (clause->data.catch_class, exclass)) {
MonoBasicBlock *tbb;
/* get the basic block for the handler and
return NULL;
}
+ } else {
+ /* Branching to an outer clause could skip inner clauses */
+ return NULL;
}
}
}