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

Fix segfault from raycast when no ray hit #1461

Merged
merged 4 commits into from
May 10, 2020
Merged

Fix segfault from raycast when no ray hit #1461

merged 4 commits into from
May 10, 2020

Conversation

jslee02
Copy link
Member

@jslee02 jslee02 commented May 10, 2020

The raycast operation causes a segfault when there is no hit. This is because DART attempts to dereference a nullptr in converting the ray hit result. This PR fixes it by changing the logic to convert ray hit results only when ray hits are found.


Before creating a pull request

  • Document new methods and classes
  • Format new code files using clang-format

Before merging a pull request

  • Set version target by selecting a milestone on the right side
  • Summarize this change in CHANGELOG.md
  • Add unit test(s) for this change

@jslee02 jslee02 added this to the DART 6.10.0 milestone May 10, 2020
@codecov
Copy link

codecov bot commented May 10, 2020

Codecov Report

Merging #1461 into master will increase coverage by 0.00%.
The diff coverage is 66.66%.

@@           Coverage Diff           @@
##           master    #1461   +/-   ##
=======================================
  Coverage   58.23%   58.23%           
=======================================
  Files         412      412           
  Lines       29923    29928    +5     
=======================================
+ Hits        17425    17429    +4     
- Misses      12498    12499    +1     
Impacted Files Coverage Δ
dart/collision/bullet/BulletCollisionDetector.cpp 70.27% <66.66%> (+0.12%) ⬆️

@jslee02 jslee02 merged commit d084d0d into master May 10, 2020
@jslee02 jslee02 deleted the bugfix/raycast branch May 10, 2020 07:08
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.

1 participant