Skip to content

Commit

Permalink
Refs #11743. Fix segmentation fault
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
  • Loading branch information
richiware committed Sep 6, 2021
1 parent b38d18f commit a6476eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpp/rtps/DataSharing/ReaderPool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class ReaderPool : public DataSharingPayloadPool

// Set the reading pointer
next_payload_ = begin();
segment_ = std::move(local_segment);
if (is_volatile_)
{
CacheChange_t ch;
Expand All @@ -139,7 +140,6 @@ class ReaderPool : public DataSharingPayloadPool
assert(next_payload_ == end());
}

segment_ = std::move(local_segment);
return true;
}

Expand Down

0 comments on commit a6476eb

Please sign in to comment.