Hardened the step-out plan in case it receives
bad stack IDs.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152630 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/ThreadPlanStepOut.cpp b/source/Target/ThreadPlanStepOut.cpp
index 1b2f751..58507a8 100644
--- a/source/Target/ThreadPlanStepOut.cpp
+++ b/source/Target/ThreadPlanStepOut.cpp
@@ -57,6 +57,9 @@
StackFrameSP return_frame_sp (m_thread.GetStackFrameAtIndex(frame_idx + 1));
StackFrameSP immediate_return_from_sp (m_thread.GetStackFrameAtIndex (frame_idx));
+ if (!return_frame_sp || !immediate_return_from_sp)
+ return; // we can't do anything here. ValidatePlan() will return false.
+
m_step_out_to_id = return_frame_sp->GetStackID();
m_immediate_step_from_id = immediate_return_from_sp->GetStackID();