diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectExpression.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index 58eaa3f..c7866f9 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -292,18 +292,12 @@ void CommandObjectExpression::HandleCompletion(CompletionRequest &request) { options.SetAutoApplyFixIts(false); options.SetGenerateDebugInfo(false); - // We need a valid execution context with a frame pointer for this - // completion, so if we don't have one we should try to make a valid - // execution context. - if (m_interpreter.GetExecutionContext().GetFramePtr() == nullptr) - m_interpreter.UpdateExecutionContext(nullptr); - - // This didn't work, so let's get out before we start doing things that - // expect a valid frame pointer. - if (m_interpreter.GetExecutionContext().GetFramePtr() == nullptr) + ExecutionContext exe_ctx(m_interpreter.GetExecutionContext()); + + // Get out before we start doing things that expect a valid frame pointer. + if (exe_ctx.GetFramePtr() == nullptr) return; - ExecutionContext exe_ctx(m_interpreter.GetExecutionContext()); Target *exe_target = exe_ctx.GetTargetPtr(); Target &target = exe_target ? *exe_target : GetDummyTarget(); |