Skip to content

Commit

Permalink
Refs #20742: Fix unset datarepresentation case
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <[email protected]>
  • Loading branch information
JesusPoderoso committed Apr 25, 2024
1 parent fdf5b40 commit 1db708d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/cpp/fastdds/subscriber/DataReaderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1787,10 +1787,14 @@ DataReaderListener* DataReaderImpl::get_listener_for(
std::shared_ptr<IPayloadPool> DataReaderImpl::get_payload_pool()
{
// Check whether DataReader's type is plain in all its data representations
bool is_plain = true;
for (auto data_representation : qos_.type_consistency().representation.m_value)
bool is_plain = type_->is_plain();
if (qos_.type_consistency().representation.m_value.size() > 0)
{
is_plain = is_plain && type_->is_plain(data_representation);
is_plain = true;
for (auto data_representation : qos_.type_consistency().representation.m_value)
{
is_plain = is_plain && type_->is_plain(data_representation);
}
}

// When the user requested PREALLOCATED_WITH_REALLOC, but we know the type cannot
Expand Down

0 comments on commit 1db708d

Please sign in to comment.