* python/py-breakpoint.c (gdbpy_breakpoint_deleted): Ensure GIL is

always released.
This commit is contained in:
Tom Tromey 2011-10-13 14:54:14 +00:00
parent a7fc3f37d4
commit d930d06e3f
2 changed files with 13 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2011-10-13 Tom Tromey <tromey@redhat.com>
* python/py-breakpoint.c (gdbpy_breakpoint_deleted): Ensure GIL is
always released.
2011-10-13 Tom Tromey <tromey@redhat.com>
* python/py-type.c (typy_has_key): Make 'field' const.

View File

@ -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);
}