Skip to content

Commit

Permalink
Copy recorder QoS profile to local variable so that temporary value i…
Browse files Browse the repository at this point in the history
…sn't cleared (ros2#803)

Signed-off-by: Emerson Knapp <eknapp@amazon.com>
  • Loading branch information
emersonknapp authored Jul 2, 2021
1 parent 2b77beb commit 8234765
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rosbag2_transport/src/rosbag2_transport/recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ void Recorder::warn_if_new_qos_for_subscribed_topic(const std::string & topic_na
// Already warned about this topic
return;
}
const auto & used_profile = existing_subscription->second->get_actual_qos().get_rmw_qos_profile();
const auto actual_qos = existing_subscription->second->get_actual_qos();
const auto & used_profile = actual_qos.get_rmw_qos_profile();
auto publishers_info = this->get_publishers_info_by_topic(topic_name);
for (const auto & info : publishers_info) {
auto new_profile = info.qos_profile().get_rmw_qos_profile();
Expand Down

0 comments on commit 8234765

Please sign in to comment.