Skip to content

Commit

Permalink
Fix access to second member of map iterator
Browse files Browse the repository at this point in the history
Signed-off-by: ISP akm <[email protected]>
  • Loading branch information
xygyo77 committed May 16, 2024
1 parent 885f7e3 commit b4095fc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions CARET_trace/src/tracing_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,10 @@ bool TracingController::is_allowed_node(const void * node_handle)
return true;
}
if (select_enabled_ && selected_node_names_.size() > 0) {
auto is_selected_node = partial_match(selected_node_names_, node_name_it.second);
auto is_selected_node = partial_match(selected_node_names_, node_name_it->second);
return is_selected_node;
} else if (ignore_enabled_ && ignored_node_names_.size() > 0) {
auto is_ignored_node = partial_match(ignored_node_names_, node_name_it.second);
auto is_ignored_node = partial_match(ignored_node_names_, node_name_it->second);
return !is_ignored_node;
}
return true;
Expand All @@ -269,18 +269,18 @@ bool TracingController::is_allowed_subscription_handle(const void * subscription
if (node_handle_it == subscription_handle_to_node_handles_.end()) {
return true;
}
auto node_name_it = node_handle_to_node_names_.find(node_handle_it.second);
auto node_name_it = node_handle_to_node_names_.find(node_handle_it->second);
if (node_name_it == node_handle_to_node_names_.end()) {
return true;
}
auto topic_name_it = subscription_handle_to_topic_names_.find(subscription_handle_it.second);
auto topic_name_it = subscription_handle_to_topic_names_.find(subscription_handle);
if (topic_name_it == subscription_handle_to_topic_names_.end()) {
return true;
}

if (select_enabled_) {
auto is_selected_node = partial_match(selected_node_names_, node_name_it.second);
auto is_selected_topic = partial_match(selected_topic_names_, topic_name_it.second);
auto is_selected_node = partial_match(selected_node_names_, node_name_it->second);
auto is_selected_topic = partial_match(selected_topic_names_, topic_name_it->second);

if (is_selected_node && selected_node_names_.size() > 0) {
return true;
Expand All @@ -290,8 +290,8 @@ bool TracingController::is_allowed_subscription_handle(const void * subscription
}
return false;
} else if (ignore_enabled_) {
auto is_ignored_node = partial_match(ignored_node_names_, node_name_it.second);
auto is_ignored_topic = partial_match(ignored_topic_names_, topic_name_it.second);
auto is_ignored_node = partial_match(ignored_node_names_, node_name_it->second);
auto is_ignored_topic = partial_match(ignored_topic_names_, topic_name_it->second);

if (is_ignored_node && ignored_node_names_.size() > 0) {
return false;
Expand Down

0 comments on commit b4095fc

Please sign in to comment.