Fixed a crash when incomplete expression variables
are materialized.
<rdar://problem/12105013>
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162046 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index da645f1..63e1be2 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -1501,6 +1501,12 @@
if (m_found_entities.ContainsVariable (member_sp))
{
+ if (!member_sp->GetValueObject())
+ {
+ err.SetErrorString("Variable being materialized doesn't have a frozen version");
+ return false;
+ }
+
RegisterInfo *reg_info = member_sp->GetRegisterInfo ();
if (reg_info)
{