aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-inferior.c
diff options
context:
space:
mode:
authorPhil Muldoon <pmuldoon@redhat.com>2010-11-23 13:33:23 +0000
committerPhil Muldoon <pmuldoon@redhat.com>2010-11-23 13:33:23 +0000
commitea976c60e229b7d4ccfbf4a735a09c407f104a20 (patch)
treea3644ba2e08af2aede1c2bae21b8a0f82052b6bf /gdb/python/py-inferior.c
parent5be229c0d8db1f0c18bc627ce31b61adac0428cd (diff)
downloadgdb-ea976c60e229b7d4ccfbf4a735a09c407f104a20.zip
gdb-ea976c60e229b7d4ccfbf4a735a09c407f104a20.tar.gz
gdb-ea976c60e229b7d4ccfbf4a735a09c407f104a20.tar.bz2
2010-11-23 Phil Muldoon <pmuldoon@redhat.com>
PR python/12212 * python/py-inferior.c (find_thread_object): Check if PIDGET returns 0. 2010-11-23 Phil Muldoon <pmuldoon@redhat.com> PR python/12212 * gdb.python/python.exp: Check that selected_thread raises an error when no inferior is loaded.
Diffstat (limited to 'gdb/python/py-inferior.c')
-rw-r--r--gdb/python/py-inferior.c3
1 files changed, 3 insertions, 0 deletions
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)