ValueObjectVariable::GetClangAST should check that it has a valid Type before accessing it.

llvm-svn: 143393
This commit is contained in:
Jim Ingham 2011-10-31 23:06:45 +00:00
parent 42fbd62d92
commit 56bbb88689
1 changed files with 4 additions and 1 deletions

View File

@ -83,7 +83,10 @@ ValueObjectVariable::CalculateNumChildren()
clang::ASTContext *
ValueObjectVariable::GetClangAST ()
{
return m_variable_sp->GetType()->GetClangAST();
Type *var_type = m_variable_sp->GetType();
if (var_type)
return var_type->GetClangAST();
return 0;
}
size_t