diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/api/multithreaded/test_listener_event_process_state.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_listener_event_process_state.cpp b/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_listener_event_process_state.cpp index a79c5cb2a08..574257e98ee 100644 --- a/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_listener_event_process_state.cpp +++ b/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_listener_event_process_state.cpp @@ -31,6 +31,11 @@ void listener_func() { throw Exception("event is not valid in listener thread"); // send process description SBProcess process = SBProcess::GetProcessFromEvent(event); + if (!process.IsValid()) + throw Exception("process is not valid"); + if (SBProcess::GetStateFromEvent(event) != lldb::eStateStopped || SBProcess::GetRestartedFromEvent(event)) + continue; // Only interested in "stopped" events. + SBStream description; for (int i = 0; i < process.GetNumThreads(); ++i) { |