From 981da8d37bab92f306a86bd8b348c7e6b3797c08 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Mon, 17 Oct 2016 23:59:41 +0000 Subject: 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. llvm-svn: 284439 --- lldb/source/Commands/CommandObjectExpression.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lldb/source/Commands/CommandObjectExpression.cpp') diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index 56aae93a93f..ba477cd5f4c 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -614,6 +614,9 @@ bool CommandObjectExpression::DoExecute(const char *command, 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 -- cgit v1.2.3