fix nullptr dereference in prune_requests_older_than
Fixes #2007
(also, completely orthogonally, why is pruned_requests a pointer and not a reference? Maybe @ivanpauno can chime in since he added this API)
It's an optional output argument, so the vector isn't used if nullptr is provided.
References cannot be nullptr, so they cannot be used in this case.
For some reason I forgot the obvious if() in the original PR.
@clalancette Sorry for waiting. I tried to add 2 tests, please check.
The way I tested them locally was:
colcon build --packages-select rclcpp
colcon test --packages-select rclcpp --ctest-args -R test_client
colcon test-result --verbose
1u
nice suggestion, fixed
Windows CI is not working yet...
@akela1101 can you address DCO failure?
@mergifyio backport humble
backport humble
✅ Backports have been created
- #2065 fix nullptr dereference in prune_requests_older_than (backport #2008) has been created for branch
humble