gazebosim / gz-sim

Open source robotics simulator. The latest version of Gazebo.
https://gazebosim.org
Apache License 2.0
719 stars 272 forks source link

Fix crash when multicopter motor system is attached to an empty model #2653

Closed iche033 closed 1 month ago

iche033 commented 1 month ago

🦟 Bug fix

Fixes #2646

Summary

See instructions in #2646 for reproducing the crash.

Crash happens because the multicopter motor system is not able to find the parent link name component of a joint but still tries to access the component data. Fixed by adding a check for null component.

Checklist

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.