diff --git a/rmw_fastrtps_cpp/src/publisher.cpp b/rmw_fastrtps_cpp/src/publisher.cpp index 2e82857bd..7ed9c0057 100644 --- a/rmw_fastrtps_cpp/src/publisher.cpp +++ b/rmw_fastrtps_cpp/src/publisher.cpp @@ -211,7 +211,7 @@ rmw_fastrtps_cpp::create_publisher( RMW_SET_ERROR_MSG("create_publisher() failed setting topic QoS"); return nullptr; } - + rmw_fastrtps_shared_cpp::TopicHolder topic; if (!rmw_fastrtps_shared_cpp::cast_or_create_topic( domainParticipant, des_topic, diff --git a/rmw_fastrtps_cpp/src/subscription.cpp b/rmw_fastrtps_cpp/src/subscription.cpp index 975fe86b8..7d9158012 100644 --- a/rmw_fastrtps_cpp/src/subscription.cpp +++ b/rmw_fastrtps_cpp/src/subscription.cpp @@ -215,7 +215,7 @@ create_subscription( RMW_SET_ERROR_MSG("create_publisher() failed setting topic QoS"); return nullptr; } - + rmw_fastrtps_shared_cpp::TopicHolder topic; if (!rmw_fastrtps_shared_cpp::cast_or_create_topic( domainParticipant, des_topic, diff --git a/rmw_fastrtps_dynamic_cpp/src/subscription.cpp b/rmw_fastrtps_dynamic_cpp/src/subscription.cpp index a3179095c..587abafa9 100644 --- a/rmw_fastrtps_dynamic_cpp/src/subscription.cpp +++ b/rmw_fastrtps_dynamic_cpp/src/subscription.cpp @@ -229,7 +229,7 @@ create_subscription( RMW_SET_ERROR_MSG("create_publisher() failed setting topic QoS"); return nullptr; } - + rmw_fastrtps_shared_cpp::TopicHolder topic; if (!rmw_fastrtps_shared_cpp::cast_or_create_topic( domainParticipant, des_topic,