[ProcessWindows] Fix rare crash on shutdown.

There might be an underlying race condition here that should be
figured out, but this at least prevents the crash for the time
being and doesn't appear to have any adverse effects.

llvm-svn: 245626
This commit is contained in:
Zachary Turner 2015-08-20 22:08:38 +00:00
parent c6845a0ddd
commit 8b14fd9070

View File

@ -568,6 +568,9 @@ ProcessWindows::RefreshStateAfterStop()
StopInfoSP stop_info;
m_thread_list.SetSelectedThreadByID(active_exception->GetThreadID());
ThreadSP stop_thread = m_thread_list.GetSelectedThread();
if (!stop_thread)
return;
RegisterContextSP register_context = stop_thread->GetRegisterContext();
// The current EIP is AFTER the BP opcode, which is one byte.