[ ] While waiting for a review on your PR, please help review another open pull request to support the maintainers
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.
🦟 Bug fix
Fixes https://github.com/gazebosim/gz-sim/issues/2531
Summary
See https://github.com/gazebosim/gz-sim/issues/2531 for instructions on reproducing the crash.
Added a check for non-empty laser scan ranges before accessing the elements.
Checklist
codecheck
passed (See contributing)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.