Skip to content

Commit 837c6c8

Browse files
Fix DataReaderHistory regression (#5327)
* Refs #21694. Turn assertion into condition. Signed-off-by: Miguel Company <[email protected]> * Refs #21694. Fix uncrustify. Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: Miguel Company <[email protected]>
1 parent a4e0019 commit 837c6c8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/cpp/fastdds/subscriber/history/DataReaderHistory.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -862,10 +862,8 @@ bool DataReaderHistory::update_instance_nts(
862862
change->reader_info.no_writers_generation_count = vit->second->no_writers_generation_count;
863863

864864
auto current_owner = vit->second->current_owner.first;
865-
if (current_owner != previous_owner)
865+
if ((current_owner != previous_owner) && (current_owner == change->writerGUID))
866866
{
867-
assert(current_owner == change->writerGUID);
868-
869867
// Remove all changes from different owners after the change.
870868
DataReaderInstance::ChangeCollection& changes = vit->second->cache_changes;
871869
auto it = std::lower_bound(changes.begin(), changes.end(), change, rtps::history_order_cmp);

0 commit comments

Comments
 (0)