Skip to content

Commit

Permalink
Refs 22843+22844: Fix
Browse files Browse the repository at this point in the history
Signed-off-by: Juanjo Garcia <[email protected]>
  • Loading branch information
juanjo4936 committed Mar 3, 2025
1 parent 4fdac36 commit d9ee40e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/cpp/xmlparser/XMLDynamicParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,17 @@ DynamicType::_ref_type XMLParser:: parseXMLMemberDynamicType(

if (!isArray)
{
member = factory->create_map_type(key_type, value_type, length)->build();
auto temp_map = factory->create_map_type(key_type, value_type, length);
if (temp_map)
{
member = temp_map->build();
}
else
{
EPROSIMA_LOG_ERROR(XMLPARSER,
"Error parsing map member with name = " << memberName);
return {};
}
}
else
{
Expand Down

0 comments on commit d9ee40e

Please sign in to comment.