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


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143393 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Core/ValueObjectVariable.cpp b/source/Core/ValueObjectVariable.cpp
index 58e37bd..1a4a89c 100644
--- a/source/Core/ValueObjectVariable.cpp
+++ b/source/Core/ValueObjectVariable.cpp
@@ -83,7 +83,10 @@
 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