Skip to content

Commit

Permalink
Refs #21733. Fix early deserialization abortion
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
  • Loading branch information
juanlofer-eprosima committed Oct 1, 2024
1 parent 37d419a commit 78cc9b1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cpp/fastdds/xtypes/dynamic_types/DynamicDataImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6479,7 +6479,12 @@ bool DynamicDataImpl::deserialize(
if (MEMBER_ID_INVALID == selected_union_member_)
{
selected_union_member_ = type->default_union_member();
ret_value = false;

// Check again after attempting to assign the default member
if (MEMBER_ID_INVALID == selected_union_member_)
{
ret_value = false;
}
}
}
else
Expand Down

0 comments on commit 78cc9b1

Please sign in to comment.