diff options
Diffstat (limited to 'gdb/python/py-infthread.c')
-rw-r--r-- | gdb/python/py-infthread.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/gdb/python/py-infthread.c b/gdb/python/py-infthread.c index 36ae71b..4b2705a 100644 --- a/gdb/python/py-infthread.c +++ b/gdb/python/py-infthread.c @@ -284,15 +284,7 @@ PyObject * gdbpy_selected_thread (PyObject *self, PyObject *args) { if (inferior_ptid != null_ptid) - { - PyObject *thread_obj - = (PyObject *) thread_to_thread_object (inferior_thread ()); - if (thread_obj != NULL) - { - Py_INCREF (thread_obj); - return thread_obj; - } - } + return thread_to_thread_object (inferior_thread ()).release (); Py_RETURN_NONE; } |