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

[InterventionalRadiologyController] Improve init checks to avoid potential crashes #72

Merged
merged 6 commits into from Oct 28, 2022

Conversation

epernod
Copy link
Collaborator

@epernod epernod commented Oct 13, 2022

  • If no instrument is given as input, the init method was searching for a single instrument using GetContext.
WBeamInterpolation * wbinterpol= context->get< WBeamInterpolation >(BaseContext::Local);
m_instrumentsList.push_back(wbinterpol);

The pointer was not tested so if no instrument were present in the scene, the IRCtrl was initialised with a null pointer.
Change this method to directly fill the vector with all corresponding component found.

epernod and others added 2 commits October 27, 2022 10:28
@hugtalbot hugtalbot merged commit 10b58d1 into sofa-framework:master Oct 28, 2022
@epernod epernod deleted the IRCtrl_init branch January 4, 2023 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Crash] in InterventionalRadiologyController if nbBeam > nbDof
3 participants