if (block_die != NULL)
sc.block = block.FindBlockByID (MakeUserID(block_die->GetOffset()));
- else
+ else if (function_die != NULL)
sc.block = block.FindBlockByID (MakeUserID(function_die->GetOffset()));
}
}
break;
}
}
- assert (die->Tag() == DW_TAG_subprogram);
+ assert (die && die->Tag() == DW_TAG_subprogram);
if (GetFunction (cu, die, sc))
{
Address addr;
{
symbol_context_scope = sc.comp_unit;
}
- else if (sc.function != NULL)
+ else if (sc.function != NULL && sc_parent_die)
{
symbol_context_scope = sc.function->GetBlock(true).FindBlockByID(MakeUserID(sc_parent_die->GetOffset()));
if (symbol_context_scope == NULL)