Skip to content

Commit

Permalink
fix(static_storage): Throw if an invalid entry was detected
Browse files Browse the repository at this point in the history
Signed-off-by: Janosch Machowinski <[email protected]>
  • Loading branch information
Janosch Machowinski authored and Janosch Machowinski committed Dec 17, 2024
1 parent 92d83ec commit 660ffaa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rclcpp/include/rclcpp/wait_set_policies/static_storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@ class StaticStorage : public rclcpp::wait_set_policies::detail::StoragePolicyCom
services_,
waitables_
);

if(this->needs_pruning_) {
// we need to throw here, as the indexing of the rcl_waitset is broken,
// in case of invalid entries

throw std::runtime_error(
"StaticStorage : storage_rebuild_rcl_wait_set: Detected invalid entity in static entity storage");
}
}

// storage_add_subscription() explicitly not declared here
Expand Down

0 comments on commit 660ffaa

Please sign in to comment.