File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -214,10 +214,11 @@ class QOSEventHandlerBase : public Waitable
214214 void
215215 set_on_new_event_callback (rcl_event_callback_t callback, const void * user_data);
216216
217- rcl_event_t event_handle_;
218- size_t wait_set_event_index_;
219217 std::recursive_mutex callback_mutex_;
220218 std::function<void (size_t )> on_new_event_callback_{nullptr };
219+
220+ rcl_event_t event_handle_;
221+ size_t wait_set_event_index_;
221222};
222223
223224template <typename EventCallbackT, typename ParentHandleT>
Original file line number Diff line number Diff line change @@ -40,9 +40,7 @@ QOSEventHandlerBase::~QOSEventHandlerBase()
4040 // This clearing is not needed for other rclcpp entities like pub/subs, since
4141 // they do own the underlying rmw entities, which are destroyed
4242 // on their rclcpp destructors, thus no risk of dangling pointers.
43- if (on_new_event_callback_) {
44- clear_on_ready_callback ();
45- }
43+ clear_on_ready_callback ();
4644
4745 if (rcl_event_fini (&event_handle_) != RCL_RET_OK) {
4846 RCUTILS_LOG_ERROR_NAMED (
You can’t perform that action at this time.
0 commit comments