Fix a crash in expressions with fixits in the dummy target.
In the expression command, if the target is NULL, you have to use the dummy
target.
<rdar://problem/28811687>
llvm-svn: 284439
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 56aae93..ba477cd 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -614,6 +614,9 @@
if (EvaluateExpression(expr, &(result.GetOutputStream()),
&(result.GetErrorStream()), &result)) {
Target *target = m_interpreter.GetExecutionContext().GetTargetPtr();
+ if (!target)
+ target = GetDummyTarget();
+
if (!m_fixed_expression.empty() && target->GetEnableNotifyAboutFixIts()) {
CommandHistory &history = m_interpreter.GetCommandHistory();
// FIXME: Can we figure out what the user actually typed (e.g. some alias