sofa-framework / sofa

Real-time multi-physics simulation with an emphasis on medical simulation.
https://www.sofa-framework.org
GNU Lesser General Public License v2.1
936 stars 312 forks source link

[Core] Fix check and use of componentState in SingleStateAccessor #4917

Closed hugtalbot closed 3 months ago

hugtalbot commented 3 months ago

I noticed that SingleStateAccessor was printing an error if mstate pointer is null which was not differentiating the following cases:

Commit of interest: https://github.com/sofa-framework/sofa/commit/172ec0028e0e1a25ff12a8eb5521499c9520afcc


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

hugtalbot commented 3 months ago

I set it as fast merge since this PR is important for several other ones

fredroy commented 3 months ago

[ci-build][with-all-tests]