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

Only dereference the data pointer if it is valid. #581

Merged
merged 1 commit into from
Dec 7, 2020

Conversation

clalancette
Copy link
Contributor

If the static_cast returned a nullptr, then just print the
message and don't attempt to deference it.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

If the static_cast returned a nullptr, then just print the
message and don't attempt to deference it.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette clalancette requested a review from a team as a code owner December 7, 2020 15:26
@clalancette clalancette requested review from emersonknapp and dabonnie and removed request for a team December 7, 2020 15:26
@clalancette
Copy link
Contributor Author

CI:

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

@clalancette
Copy link
Contributor Author

It looks like test_message_cache is flakey on macOS, so we can ignore that failure.

@emersonknapp emersonknapp merged commit b4db151 into master Dec 7, 2020
@delete-merged-branch delete-merged-branch bot deleted the clalancette/fix-test-nullptr-access branch December 7, 2020 17:53
emersonknapp pushed a commit that referenced this pull request Feb 2, 2021
If the static_cast returned a nullptr, then just print the
message and don't attempt to deference it.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
emersonknapp pushed a commit that referenced this pull request Feb 17, 2021
If the static_cast returned a nullptr, then just print the
message and don't attempt to deference it.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants