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

Fixed possible nullpointer segfault #95

Merged
merged 2 commits into from
Aug 28, 2021
Merged

Conversation

werner291
Copy link

Fix for #94

Copy link
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@werner291
Copy link
Author

That's up to the maintainers of this repo to decide... There's a bunch of lines of the form:

// Always load the robot state before using
loadSharedRobotState();

I figured there's a reason they do this rather than do it in the constructor, so I just copied that style.

The last one forces a valid RobotState through the method API,
so we can get the RobotModel from there without loading anything else.
@v4hn
Copy link
Contributor

v4hn commented Aug 11, 2021

What about adding loadSharedRobotState() there - just like in the other constructor:

The other constructor was added quite recently as an interface for new users. The original interfaces by @davetcoleman were all designed to initialize the state lazily so I would keep it that way.

There are so much worse things to criticize about the VisualTools interfaces... 🗡️

I added more safeguards and cleaned up the format error.

@v4hn v4hn merged commit 91cecd2 into moveit:master Aug 28, 2021
@werner291 werner291 deleted the patch-1 branch September 10, 2021 07:18
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.

3 participants