From af3a82baa2a3aa101f6e5615732519c4c463706f Mon Sep 17 00:00:00 2001 From: Bence Magyar Date: Wed, 10 May 2023 15:30:28 +0100 Subject: [PATCH] don't crash on no tag --- hardware_interface/src/component_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware_interface/src/component_parser.cpp b/hardware_interface/src/component_parser.cpp index 0ffdfde440..46c6b5f0e0 100644 --- a/hardware_interface/src/component_parser.cpp +++ b/hardware_interface/src/component_parser.cpp @@ -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.