Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guard against access to null node pointer #393

Merged
merged 1 commit into from
Mar 18, 2021
Merged

Conversation

jacobperron
Copy link
Member

Ensure that whenever we are getting a logger, we are not accessing a nullptr.

Fixes ros2/rviz#665

Ensure that whenever we are getting a logger, we are not accessing a nullptr.

Fixes ros2/rviz#665.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron jacobperron added the bug Something isn't working label Mar 18, 2021
@jacobperron jacobperron self-assigned this Mar 18, 2021
@jacobperron
Copy link
Member Author

Unfortunately, it's not easy to write unit tests to exercise the affected code paths. Ideally, we could mock the rclcpp::Clock object, but it does not offer any virtual methods nor is tf2_ros::Buffer templated on the clock type. I'm open to suggestions.

@jacobperron
Copy link
Member Author

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@jacobperron jacobperron merged commit 6064077 into ros2 Mar 18, 2021
@jacobperron jacobperron deleted the jacob/avoid_null_access branch March 18, 2021 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RViz crashes when use_sim_time changes value
3 participants