summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObjectVariable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/ValueObjectVariable.cpp')
-rw-r--r--lldb/source/Core/ValueObjectVariable.cpp5
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
OpenPOWER on IntegriCloud