Skip to content

Commit

Permalink
Fix bad error handling
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
  • Loading branch information
ivanpauno committed Feb 14, 2020
1 parent 3aee070 commit c0c56b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rclpy/src/rclpy/_rclpy_qos_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,13 @@ rclpy_create_event(PyObject * Py_UNUSED(self), PyObject * args)
_rclpy_handle_add_dependency(event_handle, parent_handle);
if (PyErr_Occurred()) {
_rclpy_handle_dec_ref(event_handle);
return NULL;
}
PyObject * event_capsule = _rclpy_create_handle_capsule(event_handle, "rcl_event_t");
if (!event_capsule) {
_rclpy_handle_dec_ref(event_handle);
return NULL;
}
return event_capsule;
}

Expand Down

0 comments on commit c0c56b9

Please sign in to comment.