Skip to content

prevent crash when setting initial pose before first scan#73

Merged
rsasaki0109 merged 1 commit intorsasaki0109:mainfrom
Demonofpower:main
Nov 9, 2025
Merged

prevent crash when setting initial pose before first scan#73
rsasaki0109 merged 1 commit intorsasaki0109:mainfrom
Demonofpower:main

Conversation

@Demonofpower
Copy link
Contributor

When using set_initial_pose=false and passing a pose estimate before first scan arriving, last_scan_ptr_ is null but initialPoseReceived calls cloudReceived(last_scan_ptr_) which tries to access it leading to undefined behaviour.

This PR adds a null check in cloudReceived() and prevents calling cloudReceived(last_scan_ptr_) in initialPoseReceived when last_scan_ptr_ is null.

@rsasaki0109 rsasaki0109 merged commit a7b6bf8 into rsasaki0109:main Nov 9, 2025
2 checks passed
@rsasaki0109
Copy link
Owner

@Demonofpower
Thanks for the PR! Looks good to me, so I’ve merged it.

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.

2 participants