diff --git a/rmw_zenoh_cpp/src/detail/rmw_data_types.cpp b/rmw_zenoh_cpp/src/detail/rmw_data_types.cpp index a44625c6..fcba6db0 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_data_types.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_data_types.cpp @@ -32,7 +32,7 @@ void EventsBase::set_user_callback( { std::lock_guard lock_mutex(event_mutex_); - if (callback_) { + if (callback) { // Push events arrived before setting the the executor callback. if (unread_count_) { callback(user_data, unread_count_);