{
if (non_stop)
{
- thread_info *thread = find_thread_ptid (ptid);
+ thread_info *thread
+ = find_thread_ptid (current_inferior ()->process_target (),
+ ptid);
if (thread != nullptr)
return thread_to_thread_object (thread);
PyErr_SetString (PyExc_RuntimeError, "Could not find event thread");