Skip to content

Commit e3142d0

Browse files
author
Janosch Machowinski
committed
fix(static_storage): Throw if an invalid entry was detected
Signed-off-by: Janosch Machowinski <[email protected]>
1 parent 67d9fc4 commit e3142d0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

rclcpp/include/rclcpp/wait_set_policies/static_storage.hpp

+9
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,15 @@ class StaticStorage : public rclcpp::wait_set_policies::detail::StoragePolicyCom
160160
services_,
161161
waitables_
162162
);
163+
164+
if(this->needs_pruning_) {
165+
// we need to throw here, as the indexing of the rcl_waitset is broken,
166+
// in case of invalid entries
167+
168+
throw std::runtime_error(
169+
"StaticStorage : storage_rebuild_rcl_wait_set: Detected"
170+
" invalid entity in static entity storage");
171+
}
163172
}
164173

165174
// storage_add_subscription() explicitly not declared here

0 commit comments

Comments
 (0)