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

Warn and skip adding normal cloud if it is empty #2265

Merged

Conversation

taketwo
Copy link
Member

@taketwo taketwo commented Mar 26, 2018

Currently the PCLVisualizer::addPointCloudNormals() function does not check if the supplied normal cloud is empty. While perhaps logically it's okay to add an empty cloud, the implementation of the function can not deal with empty clouds (see this line, size_t underflows and nr_normals becomes a ridiculously large number, bad alloc follows). This patch adds an a warning and an early return to avoid issues.

@taketwo taketwo added needs: code review Specify why not closed/merged yet module: visualization labels Mar 26, 2018
@SergioRAgostinho SergioRAgostinho added kind: bug Type of issue and removed needs: code review Specify why not closed/merged yet kind: bug Type of issue labels Mar 27, 2018
@SergioRAgostinho SergioRAgostinho merged commit 3abf9a9 into PointCloudLibrary:master Mar 27, 2018
@taketwo taketwo deleted the visualizer-normal-check branch March 27, 2018 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants