diff options
author | Jim Ingham <jingham@apple.com> | 2011-10-31 23:06:45 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-10-31 23:06:45 +0000 |
commit | 56bbb886894468de5457ac0c6149ea589a7a9492 (patch) | |
tree | e296009aac6dfe9ed33f17c5a521a2879eb22323 /lldb/source/Core/ValueObjectVariable.cpp | |
parent | 42fbd62d925fff5d32c61e41752ccc1c4c81a058 (diff) | |
download | bcm5719-llvm-56bbb886894468de5457ac0c6149ea589a7a9492.tar.gz bcm5719-llvm-56bbb886894468de5457ac0c6149ea589a7a9492.zip |
ValueObjectVariable::GetClangAST should check that it has a valid Type before accessing it.
llvm-svn: 143393
Diffstat (limited to 'lldb/source/Core/ValueObjectVariable.cpp')
-rw-r--r-- | lldb/source/Core/ValueObjectVariable.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Core/ValueObjectVariable.cpp b/lldb/source/Core/ValueObjectVariable.cpp index 58e37bdfc9e..1a4a89ce382 100644 --- a/lldb/source/Core/ValueObjectVariable.cpp +++ b/lldb/source/Core/ValueObjectVariable.cpp @@ -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 |