diff --git a/rmw_zenoh_cpp/src/rmw_zenoh.cpp b/rmw_zenoh_cpp/src/rmw_zenoh.cpp index f2c4974c..06355e34 100644 --- a/rmw_zenoh_cpp/src/rmw_zenoh.cpp +++ b/rmw_zenoh_cpp/src/rmw_zenoh.cpp @@ -1568,7 +1568,7 @@ rmw_destroy_subscription(rmw_node_t * node, rmw_subscription_t * subscription) allocator->deallocate(sub_data->type_support, allocator->state); z_owned_subscriber_t * sub = std::get_if(&sub_data->sub); - if (sub != NULL) { + if (sub != nullptr) { if (z_undeclare_subscriber(z_move(*sub)) != Z_OK) { RMW_SET_ERROR_MSG("failed to undeclare sub"); ret = RMW_RET_ERROR; @@ -1576,7 +1576,7 @@ rmw_destroy_subscription(rmw_node_t * node, rmw_subscription_t * subscription) } else { ze_owned_querying_subscriber_t * querying_sub = std::get_if(&sub_data->sub); - if (querying_sub == NULL || ze_undeclare_querying_subscriber(z_move(*querying_sub))) { + if (querying_sub == nullptr || ze_undeclare_querying_subscriber(z_move(*querying_sub))) { RMW_SET_ERROR_MSG("failed to undeclare sub"); ret = RMW_RET_ERROR; }