diff options
author | Tom Tromey <tromey@redhat.com> | 2011-10-13 14:54:14 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2011-10-13 14:54:14 +0000 |
commit | d930d06e3fd1c821a020561a8cc583db005f7c10 (patch) | |
tree | 3dc0998b17a029af2db307f559fab3f17b10829c /gdb/python | |
parent | a7fc3f37d47e196365f04fea7e1f17b4d56b83e4 (diff) | |
download | fsf-binutils-gdb-d930d06e3fd1c821a020561a8cc583db005f7c10.zip fsf-binutils-gdb-d930d06e3fd1c821a020561a8cc583db005f7c10.tar.gz fsf-binutils-gdb-d930d06e3fd1c821a020561a8cc583db005f7c10.tar.bz2 |
* python/py-breakpoint.c (gdbpy_breakpoint_deleted): Ensure GIL is
always released.
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-breakpoint.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c index 3dc0fca..87265e2 100644 --- a/gdb/python/py-breakpoint.c +++ b/gdb/python/py-breakpoint.c @@ -841,15 +841,15 @@ gdbpy_breakpoint_deleted (struct breakpoint *b) state = PyGILState_Ensure (); bp = get_breakpoint (num); - if (! bp) - return; - - bp_obj = bp->py_bp_object; - if (bp_obj) + if (bp) { - bp_obj->bp = NULL; - --bppy_live; - Py_DECREF (bp_obj); + bp_obj = bp->py_bp_object; + if (bp_obj) + { + bp_obj->bp = NULL; + --bppy_live; + Py_DECREF (bp_obj); + } } PyGILState_Release (state); } |