From ea976c60e229b7d4ccfbf4a735a09c407f104a20 Mon Sep 17 00:00:00 2001 From: Phil Muldoon Date: Tue, 23 Nov 2010 13:33:23 +0000 Subject: 2010-11-23 Phil Muldoon PR python/12212 * python/py-inferior.c (find_thread_object): Check if PIDGET returns 0. 2010-11-23 Phil Muldoon PR python/12212 * gdb.python/python.exp: Check that selected_thread raises an error when no inferior is loaded. --- gdb/python/py-inferior.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/python/py-inferior.c') diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c index b1ddb168..6382dab 100644 --- a/gdb/python/py-inferior.c +++ b/gdb/python/py-inferior.c @@ -130,6 +130,9 @@ find_thread_object (ptid_t ptid) PyObject *inf_obj; pid = PIDGET (ptid); + if (pid == 0) + return NULL; + inf_obj = find_inferior_object (pid); if (inf_obj) -- cgit v1.1