summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/Thread.cpp')
-rw-r--r--lldb/source/Target/Thread.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp
index fd06a2c4ee0..c483e5ae3da 100644
--- a/lldb/source/Target/Thread.cpp
+++ b/lldb/source/Target/Thread.cpp
@@ -606,10 +606,11 @@ Thread::DiscardPlan ()
ThreadPlan *
Thread::GetCurrentPlan ()
{
- if (m_plan_stack.empty())
- return NULL;
- else
- return m_plan_stack.back().get();
+ // There will always be at least the base plan. If somebody is mucking with a
+ // thread with an empty plan stack, we should assert right away.
+ assert (!m_plan_stack.empty());
+
+ return m_plan_stack.back().get();
}
ThreadPlanSP
OpenPOWER on IntegriCloud