Skip to content

Commit

Permalink
don't crash on no tag
Browse files Browse the repository at this point in the history
  • Loading branch information
bmagyar authored May 10, 2023
1 parent ae12b90 commit af3a82b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hardware_interface/src/component_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ std::string parse_data_type_attribute(const tinyxml2::XMLElement * elem)
bool parse_is_async_attribute(const tinyxml2::XMLElement * elem)
{
const tinyxml2::XMLAttribute * attr = elem->FindAttribute(kIsAsyncAttribute);
return parse_bool(attr->Value());
return attr ? parse_bool(attr->Value()) : false;
}

/// Search XML snippet from URDF for parameters.
Expand Down

0 comments on commit af3a82b

Please sign in to comment.