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

Initialized pointers to nullptr to avoid segmentation fault when stop… #1

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

filippo-biondi
Copy link

Segmentation fault on HesaiLidarSdk::Stop()

When calling the Stop method of an HesaiLidarSdk object created with the DATA_FROM_PCAP option a segmentation fault ocour. This happens because pointers are not initialized to nullptr an thus, when the destructor of Lidar<T_Point> is called, a delete is performed on ptc_client_ even if it has not been allocated. To solve the issues all pointers in Lidar<T_Point> has been intialized to nullptr (I would suggest to check also all the pointers in the other classes).

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