diff --git a/rclpy/src/rclpy/_rclpy.c b/rclpy/src/rclpy/_rclpy.c index dfff92816..0737dcd0a 100644 --- a/rclpy/src/rclpy/_rclpy.c +++ b/rclpy/src/rclpy/_rclpy.c @@ -2104,6 +2104,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 {