diff options
author | Phil Muldoon <pmuldoon@redhat.com> | 2010-11-23 13:33:23 +0000 |
---|---|---|
committer | Phil Muldoon <pmuldoon@redhat.com> | 2010-11-23 13:33:23 +0000 |
commit | ea976c60e229b7d4ccfbf4a735a09c407f104a20 (patch) | |
tree | a3644ba2e08af2aede1c2bae21b8a0f82052b6bf /gdb/python/py-inferior.c | |
parent | 5be229c0d8db1f0c18bc627ce31b61adac0428cd (diff) | |
download | gdb-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.c | 3 |
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) |