Skip to content

Commit

Permalink
fix sigint guard condition's lifecycle bug (#288) (#298)
Browse files Browse the repository at this point in the history
* fix #215

Signed-off-by: reed-lau <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
  • Loading branch information
sloretz authored Mar 29, 2019
1 parent 8c46ce8 commit 3ba2c48
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rclpy/src/rclpy/_rclpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2115,6 +2115,9 @@ rclpy_destroy_entity(PyObject * Py_UNUSED(self), PyObject * args)
} else if (PyCapsule_IsValid(pyentity, "rcl_guard_condition_t")) {
rcl_guard_condition_t * guard_condition = (rcl_guard_condition_t *)PyCapsule_GetPointer(
pyentity, "rcl_guard_condition_t");
if (g_sigint_gc_handle == guard_condition) {
g_sigint_gc_handle = NULL;
}
ret = rcl_guard_condition_fini(guard_condition);
PyMem_Free(guard_condition);
} else {
Expand Down

0 comments on commit 3ba2c48

Please sign in to comment.