Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

fix segfault: safely handle empty robot model #154

Merged
merged 1 commit into from
Sep 13, 2016

Conversation

rhaschke
Copy link
Contributor

No description provided.

@@ -189,6 +189,9 @@ bool treeFromXml(TiXmlDocument *xml_doc, Tree& tree)

bool treeFromUrdfModel(const urdf::ModelInterface& robot_model, Tree& tree)
{
if (!robot_model.getRoot())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

robot_model might be empty with undefined root. In this case access to root members below will segfault.

@jacquelinekay
Copy link
Contributor

Thanks, Robert!

@jacquelinekay jacquelinekay merged commit f492cfe into ros:kinetic-devel Sep 13, 2016
@rhaschke rhaschke deleted the fix-segfault branch September 14, 2016 18:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants