Skip to content

Commit

Permalink
Fix segfault when deleting nested channels (#633)
Browse files Browse the repository at this point in the history
  • Loading branch information
daboehme authored Jan 8, 2025
1 parent d6fcd65 commit 98fd2f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/caliper/Caliper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1372,8 +1372,8 @@ void Caliper::finalize()

Log(1).stream() << "Finalizing ... " << std::endl;

auto channels_copy = sG->all_channels;
for (auto& channel : channels_copy) {
while (!sG->all_channels.empty()) {
auto channel = sG->all_channels.front();
if (channel.mP->flush_on_exit)
flush_and_write(&channel, SnapshotView());
delete_channel(channel);
Expand Down

0 comments on commit 98fd2f2

Please sign in to comment.