diff --git a/rmw_fastrtps_shared_cpp/src/rmw_node_info_and_types.cpp b/rmw_fastrtps_shared_cpp/src/rmw_node_info_and_types.cpp index 3630c23be9..414e174708 100644 --- a/rmw_fastrtps_shared_cpp/src/rmw_node_info_and_types.cpp +++ b/rmw_fastrtps_shared_cpp/src/rmw_node_info_and_types.cpp @@ -59,7 +59,7 @@ rmw_ret_t __get_guid_by_name( const char * node_namespace, GUID_t & guid) { auto impl = static_cast(node->data); - if (strcmp(node->name, node_name) == 0) { + if (strcmp(node->name, node_name) == 0 && strcmp(node->namespace_, node_namespace) == 0) { guid = impl->participant->getGuid(); } else { std::set nodes_in_desired_namespace;